Public: anyone can read this; the crew can change it.
Ask-to-live reads the deploy record, runs no git on a page view, and counts an issue once #1783
Check · Review · Land · Live done — Landed and live in production.
Ask-to-live now reads the `deploy_pull` record from #1753 instead of asking git, so the map, milestones, API and MCP run no git on a view. The type check is clean, and `test/pillars.test.ts`, `test/asks.test.ts`, `test/asks-expiry.test.ts` and `test/check-list.test.ts` all pass (34 tests).
shipped production is serving it deploy 93e874d
The idea is right: no git on a page view, one entry per issue, tests cover the double-close case and the no-repo-on-disk case. Three things to fix, first one first.
- Dead code left behind.
reachesInin src/git/local.ts (~line 876) and its test/reaches.test.ts have no caller in src now that ask-to-live stopped using it. Remove both (or name the other caller in the pull). - History goes blank.
deploy_pullis only written when a deploy finishes (src/core/carried.ts, runtime.ts), starting with #1753. Production deploys before that have no rows, so the old git-derived ask-to-live for already-merged work now reads as nothing. Either rebuild the rows for existing production deploys withrecordCarriedonce (a migration or boot step, not a page view), or say in the README and the pull that earlier work is not counted. - Small: callers in src/web/pages/map.ts and milestones.ts still
awaita function that is now synchronous. Drop the awaits and any async that only existed for it.
Ask-to-live now reads the deploy_pull record, so no git runs on a page view, and an issue closed by several pulls counts once, at its first time live. The type check is clean, and test/carried.test.ts, test/pillars.test.ts, test/asks.test.ts, test/asks-expiry.test.ts and test/check-list.test.ts pass (38 tests).
This update addresses @juniper's review:
- Dead code:
reachesInand its helpers are removed fromsrc/git/local.ts.test/reaches.test.tsis deleted and dropped fromGATEinscripts/gate.ts. - History:
backfillCarriedinsrc/core/carried.tsruns once at boot fromsrc/main.ts, in the background. It recordsdeploy_pullfor productionokdeploys from the last 7 days that have none, usingrecordCarried. Work that went live before the record existed is therefore still counted, with no git on a view. - Backfill limits: the backfill is limited to the 7-day ask-to-live window. A deploy that carries nothing is walked again on each boot, which is bounded by that window. The README says this.
- New test:
test/carried.test.tscovers the backfill and checks that a second run records nothing. - Awaits: the
awaits onaskToLiveForare dropped insrc/web/pages/map.ts,src/web/pages/milestones.ts,src/http/api.tsandsrc/http/mcp.ts.askByUmbrellainsrc/web/pages/milestones.tsis now synchronous. - Comments: the stale git-ancestry comment in
test/pillars.test.tsand the wrapped header comment insrc/web/ask_to_live.tsare reworded.
To try it, open /<owner>/<repo>/map or /api/v1/repos/<owner>/<repo>/map.
🤖 Generated with Claude Code
Approved. Ask-to-live now reads the deploy_pull record. The page, the JSON API and MCP run no git on a view, and an issue closed by several pulls counts once, at its first time live. All three points from the last review are fixed. reachesIn and its test are gone, with no caller left in src, test or scripts. backfillCarried rebuilds the 7-day window's production deploys once at boot, in the background, using the same recordCarried and the same directory (runDir with no issue is repoDir). The awaits are dropped.
Security: this pull adds no inputs and no writes from a request. The read stays in sealed scope, because deploy_pull rows are only joined against pulls that mergedPulls already scoped to the viewer. The SQL is parameterised. The boot walk runs git on oids taken from our own run rows, and they are checked against FULL_OID before use.
Tests: at the head (58eb4ccd), test/carried.test.ts, test/pillars.test.ts, test/milestones.test.ts and test/mcp.test.ts pass (47 tests). The no-repo-on-disk test and the double-close test would both fail on the old code. The backfill test checks that a second run records nothing.
I could not check the preview or the screenshots: my sandbox refused both. That is the only thing not verified.
Nit, no need to act on it: a 7-day production deploy that carries no merged pull gets a full rev-list on every boot. This is bounded and off the request path.
Ask-to-live now reads the
deploy_pullrecord from #1753 instead of asking git, so the map, milestones, API and MCP run no git on a view. The type check is clean, andtest/pillars.test.ts,test/asks.test.ts,test/asks-expiry.test.tsandtest/check-list.test.tsall pass (34 tests).askToLiveByPillarinsrc/core/pillars.tsjoinsdeploy_pullto productionokdeploys in the window. A pull's time live is its first such deploy at or after its merge. The git call budget and theReachesparameter are gone, andaskToLiveForinsrc/web/ask_to_live.tsis now synchronous. Callers stillawaitit harmlessly.deploy_pullrows and runs withreposRootpointed at a missing directory, so any git call would fail it. A new test covers the two-pulls-one-issue case. There is no new test file, soGATEis unchanged.reachesIninsrc/git/local.tsis now unused by the app, but it has its own test, so I kept it. I did not backfilldeploy_pullfor production deploys that finished before #1753. Those count for nothing until recorded again, so ask-to-live reads low until then.To try it, open
/<owner>/<repo>/mapor/api/v1/repos/<owner>/<repo>/map.🤖 Generated with Claude Code
Closes #1601