GeezerVison is showing github.com — Phase 3 (audit) of #3879 — closing promise-memo inventory + contract statement · Issue #3880 · developing-today/code
Phase 3 (audit) of #3879 — closing promise-memo inventory + contract statement #3880DescriptionPhase 3 of design #3879 — closing inventory + contract statement (success-only memoization)
Parent design: #3879 ("failure is not a result — one success-only memoization contract for lazy initializers"). Design doc: files/designs/code-success-only-memoization.md in the keep-the-four-repos-healthy goal workspace. Audit baseline: origin/main 064ce9e5.
Gated on Phases 1–2 of the design: Phase 1 = #3732 (alerts client + store latches), Phase 2 = #3729 (push configure latch). Do not start the inventory before both land.
Scope
(a) Contract statement: write the design's contract (a lazy initializer memoizes success, never failure; clear on settle; every layer clears independently; failure values count as failure; in-flight sharing preserved) into pm-stack/aggregator/README.md as the app's lazy-initialization rule, and add a one-line pointer comment at each of the three memo sites (src/supabase.ts clientPromise, src/alerts.ts storePromise, src/push.ts configurePromise).
(b) Repo-wide promise-memo inventory: enumerate the module-level promise/lazy-init memos in pm-stack/, bin/, pkgs/ (record the grep pattern used on the design issue) and disposition each on the design issue — conforming / fixed under this issue (only if a same-shape failure latch is confirmed and the fix is small) / filed as a named follow-up / deliberately local with reason. Known candidates from the pass-33 grep, to be verified rather than presumed:
bin/muse-proxy.mjs — cliCapsPromise (CLI-capability probe promise; examine its settle behaviour on a failed probe).
pkgs/id/web/src/highlight.ts — highlighterPromise (a rejected creation would latch; browser-side).
bin/antigravity-direct.mjs — _tokenPromise (expected conforming: cleared in a finally).
pm-stack/dispatch/src/auth.ts — fetchGithubJwks (expected conforming: success-only cache).
- aggregator
src/server.ts priming, src/sources/live.ts TTL caches, src/secrets.ts (expected conforming — verify, do not re-fix).
(c) Open-question disposition: record on the design issue whether the supabase client's lack of a token-rotation invalidation path (noted as an open question in the design doc) stays evidence-gated or has gained evidence since the design; do not implement a reset without that evidence.
(d) Cross-note on #2668: post the note recording that its pm-dispatch rule ("memoized init caches success only") is now the aggregator's contract too, citing the landed phases, so both designs cite one rule.
Acceptance criteria
🤖 Filed by the design architect (pass 33, 2026-11-01) as Phase 3 of the success-only memoization design. Activitydezren39 commented on Nov 1, 2026 🤖 Agent note · filed as Phase 3 of design #3879
- Agent: design architect (repo-design-architect-code), pass 33
- Task: Closing audit of design Design: failure is not a result — one success-only memoization contract for lazy initializers (aggregator first) #3879: contract statement in the aggregator README + pointer comments at the three memo sites, a repo-wide promise-memo inventory with a disposition per site (known candidates: bin/muse-proxy
cliCapsPromise, pkgs/id/web highlighterPromise; expected-conforming sites verified, not re-fixed), the supabase token-rotation disposition, and the cross-note on design(pm-dispatch): launch pipeline, staged — validate the whole request at the boundary, one commit point, nothing after it can fail the launch #2668.
- Outcome: Filed with
status/blocked — gated on Phase 1 (aggregator(alerts): getSupabaseClient and getAlertsStore both memoize a transient null forever — the alerts ledger stays unavailable until restart #3732) and Phase 2 (aggregator(push): ensurePushConfigured memoizes a failed VAPID configure forever — one transient bws failure disables Web Push for the process lifetime #3729) landing; triage packet enqueued to repo-health-code-pilot in this same pass. Do not start the inventory before the gates clear.
- Links: Design: failure is not a result — one success-only memoization contract for lazy initializers (aggregator first) #3879, aggregator(alerts): getSupabaseClient and getAlertsStore both memoize a transient null forever — the alerts ledger stays unavailable until restart #3732, aggregator(push): ensurePushConfigured memoizes a failed VAPID configure forever — one transient bws failure disables Web Push for the process lifetime #3729
dezren39 commented on Nov 1, 2026 dezren39 commented on Nov 1, 2026 🤖 Agent note · done (triage)
Scope verification (fresh at main f54b04329; design audit baseline was 064ce9e5 — the delta between them is the pkgs/id Phase 1 merge and does not touch pm-stack)
All three memo sites exist exactly as scoped:
pm-stack/aggregator/src/supabase.ts:43 — let clientPromise: Promise<SupabaseClient | null> backing getSupabaseClient() (never cleared on a null resolution).
pm-stack/aggregator/src/alerts.ts:481 — let storePromise backing getAlertsStore(), stacked on getSupabaseClient().
pm-stack/aggregator/src/push.ts:26 — let configurePromise backing ensurePushConfigured().
The four-part scope (a) contract statement in pm-stack/aggregator/README.md + pointer comments at the three sites, (b) repo-wide promise-memo inventory over pm-stack/, bin/, pkgs/ with per-site dispositions on #3879, (c) supabase token-rotation disposition on #3879, (d) cross-note on #2668 — is landable as scoped, as ONE packet: parts (a), (c), (d) are writing/recording work and (b) is a bounded inventory with named candidates; no rescope needed. The phase is not independently landable yet only because of the gate below, not because of its shape.
Gating (recorded, per this triage's acceptance)
This issue keeps status/blocked until both land. The follow-up packet carries the same hard gate: its worker must re-check both fresh on claim and park if either is unlanded — the inventory must not be pre-run, because its dispositions cite the landed Phase 1-2 shapes.
Follow-up packet
Task 5857 — "Fix #3880: Phase 3 closing audit of #3879 — contract statement + repo-wide promise-memo inventory (GATED on #3732 + #3729)", dedupe repo-health:v1:fix:developing-today/code:issue:3880, queued on repo-health-code-pilot with #3880's acceptance criteria intact (packet file: goal workspace hidden_files/queue-pilot/packet-3880-phase3.json). Verification commands for the follow-up, per the triage packet: repo test suites via CI (fleet policy — no builds on the sandbox); the inventory's grep pattern recorded on #3879 for reproducibility.
Questions for Drew
None — design #3879 recorded its decisions (clear-on-settle, independent per-layer clearing, failure values count as failure, in-flight sharing) and this triage's scope excludes re-litigating them; the token-rotation question is an evidence question the audit itself dispositions, not a decision for Drew today.
dezren39 commented on Nov 6, 2026 🤖 Agent note · handed off
dezren39 commented on Nov 6, 2026 🤖 Agent note · handed off
- Agent: fleet monitor (repo-fleet-monitor)
- Session / ID: task 5857 · repo-fleet-monitor run 2026-11-05 20:12 CST
- Found via: monitor reconciliation
- Task: Claim evaporated — the previous holder's claim on task 5857 ended without a terminal verb and the task is queued unclaimed (attempts 48/48, last checkpoint stage: handed_off). Labels reset to the truth: queue/queued + status/needs-triage. The fleet monitor's dead-in-queue pass this run also raised the attempt cap where it had been reached.
- Expectation: the next queue claimant picks up task 5857 from the handed_off checkpoint; no work was lost.
dezren39 commented on Nov 7, 2026
Picked up by repo-worker-code-f — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-f posts progress markers; after 30 minutes of silence any other worker may pick this up.) dezren39 commented on Nov 7, 2026
Progress from repo-worker-code-f: verified: gate cleared - #3732 and #3729 both CLOSED fresh 2026-11-07; next: verify memo sites + README on current main dezren39 commented on Nov 7, 2026
Progress from repo-worker-code-f: branch_created: queue/3880-phase3-memoization-audit at origin/main 9640974; inventory greps done - sites enumerated; next: README contract + pointer comments + highlight.ts clear-on-reject fix dezren39 commented on Nov 7, 2026
Progress from repo-worker-code-f: pr_opened: PR #6796 (contract + pointers + highlight fix); inventory posted on #3879, cross-note on #2668; next: CI check then merge or release developing-today commented on Nov 7, 2026 🤖 Agent note · Phase 3 audit worked (fallback mode) — remainder: merge PR #6796 on green CI
- Agent: queue worker lane F (repo-worker-code-f), fallback claim (queue backend down, code#6619)
- Gate: re-verified fresh this shift — Phase 1 aggregator(alerts): getSupabaseClient and getAlertsStore both memoize a transient null forever — the alerts ledger stays unavailable until restart #3732 CLOSED, Phase 2 aggregator(push): ensurePushConfigured memoizes a failed VAPID configure forever — one transient bws failure disables Web Push for the process lifetime #3729 CLOSED. The gate that parked this audit since 2026-11-01 is cleared.
- Done in PR docs(aggregator): success-only memoization contract + highlight latch fix (#3880) #6796 (branch
queue/3880-phase3-memoization-audit, commit 95c73bed7e, base origin/main 9640974a):
- (a) Contract statement in
pm-stack/aggregator/README.md matching design Design: failure is not a result — one success-only memoization contract for lazy initializers (aggregator first) #3879's wording + one-line pointer comments at all three memo sites (supabase.ts clientPromise, alerts.ts storePromise, push.ts configurePromise).
- (b) Repo-wide inventory posted on Design: failure is not a result — one success-only memoization contract for lazy initializers (aggregator first) #3879 with a disposition per site — including the one confirmed same-shape latch outside the aggregator,
pkgs/id/web/src/highlight.ts highlighterPromise, fixed in PR docs(aggregator): success-only memoization contract + highlight latch fix (#3880) #6796 (memo clears on rejection; success stays cached).
- (c) Token-rotation disposition recorded on Design: failure is not a result — one success-only memoization contract for lazy initializers (aggregator first) #3879: stays evidence-gated, no reset implemented, trigger named.
- (d) Cross-note posted on design(pm-dispatch): launch pipeline, staged — validate the whole request at the boundary, one commit point, nothing after it can fail the launch #2668.
- Codex review on PR docs(aggregator): success-only memoization contract + highlight latch fix (#3880) #6796: completed, no findings.
- Remainder (why this is released
free, not done): PR docs(aggregator): success-only memoization contract + highlight latch fix (#3880) #6796's CI was still pending after the 5-minute poll window (basic tier + native arm64 jobs). Next worker: check PR docs(aggregator): success-only memoization contract + highlight latch fix (#3880) #6796 checks; if green, merge it and close Phase 3 (audit) of #3879 — closing promise-memo inventory + contract statement #3880 (all other acceptance criteria are met); if red, fix forward on the same branch. Do not redo the inventory — it is on Design: failure is not a result — one success-only memoization contract for lazy initializers (aggregator first) #3879.
dezren39 commented on Nov 7, 2026
Released by repo-worker-code-f (outcome: free). Phase 3 audit worked: PR #6796 opened (README contract + 3 pointer comments + highlight.ts latch fix), inventory on #3879, token-rotation disposition on #3879, cross-note on #2668, Codex no findings. REMAINS: merge PR #6796 when its pending CI goes green, then close #3880. developing-today commented on Nov 7, 2026 Phase 3 complete: the closing promise-memo inventory was posted on #3879 by lane code-f (2026-11-07T05:20Z, all sites dispositioned), and its implementation PR #6796 (contract statement in pm-stack/aggregator/README.md, pointer comments at the three memo sites, pkgs/id/web highlight.ts latch fix) was MERGED as ed2534c by lane code-b after diff verification. Part (c) disposition (supabase token rotation stays evidence-gated, no reset implemented) is recorded on #3879. Closing #3880 as done.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|