GeezerVison is showing github.com — Phase 4 (audit) of #4302 — closing writer inventory + contract statement for the PM projector · Issue #4303 · developing-today/code
Phase 4 (audit) of #4302 — closing writer inventory + contract statement for the PM projector #4303DescriptionPhase 4 (closing audit) of design #4302 — a projection writes only what the event proves: one application contract for the PM projector. Design doc: files/designs/code-projector-application-contract.md in the keep-the-four-repos-healthy goal workspace.
Gated on Phases 1–3 of #4302 landing (Phase 1 = #2456 + #2982, Phase 2 = #2694 + #2455 + #3087, Phase 3 = #4158 + #4210). Do not start the audit before they land.
Scope
- Contract statement landed: the contract from Design: a projection writes only what the event proves — one application contract for the PM projector #4302 (real delivery identity + success-only dedupe; kind-namespaced object identity; guard key = the source object's last-update time, never creation or delivery time; absence writes nothing; deletion reachable for every projected kind and absorbing for comments) is written into the
schema.sql header / projector README, where the "applied at most once" comment already lives, replacing that comment's now-stale wording.
- Writer inventory: every writer of
pmp_items, pmp_comments, pmp_deliveries and pmp_push_events — every applyEvent branch in projector.ts, every reconcile stream in reconcile.ts, recordPush, and the links writers — is dispositioned against the contract's six decisions (conforms / fixed in this audit if a single-writer slip / filed as a named follow-up). The inventory is recorded on Design: a projection writes only what the event proves — one application contract for the PM projector #4302 or in the projector README beside the contract statement.
- Required dispositions (each recorded on Design: a projection writes only what the event proves — one application contract for the PM projector #4302 with its reason):
- Transferred issues: the source-repo row after an
issues/transferred event — delete, keep, or re-key — decided with the transfer payload's actual shape in hand (projector(items): an issues deleted event is upserted, not removed — deleted GitHub issues stay in pmp_items forever (no delete path exists, and reconcile only upserts) #4210's explicit out-of-scope, dispositioned here).
- The item row's own
new Date() created-at fallback (projector.ts:43): unreachable for real issue/PR payloads, which always carry created_at — remove for symmetry with Phase 2's comment rule, or record as deliberately-local with the reason.
recordPush dedupe under Phase 1: verify pushes inherit the real-identity + success-only contract (they key on the same delivery id) — verify, don't assume.
- Secondary comment fields under the absence rule:
review_state, path/line, diff_hunk — presence semantics checked per field, not assumed from Phase 3's item rule.
- Closing evidence on Design: a projection writes only what the event proves — one application contract for the PM projector #4302: all seven origins (projector(webhook): a delivery that fails to apply can never be retried — its error row makes every redelivery a 'duplicate', and push events are lost permanently #2456, projector(webhook): a missing X-GitHub-Delivery header collapses every later delivery into the first one's identity — distinct events are silently dropped as 'duplicate' #2982, projector(comments): pmp_comments is keyed by the bare GitHub numeric ID — an issue comment, a review comment and a review with the same ID silently overwrite each other #2694, projector(comments): a deleted comment is resurrected by any stale upsert — the comments monotonic guard keys on created_at and markCommentDeleted never advances it #2455, projector(reviews): webhook reviews get a fabricated created_at (delivery time, not submitted_at) — reconcile's correct row is then guard-refused forever #3087, projector(items): an issues/issue_comment event for a merged PR resets merged to 0 and clears merged_at — issue-shaped payloads carry no merge fields #4158, projector(items): an issues deleted event is upserted, not removed — deleted GitHub issues stay in pmp_items forever (no delete path exists, and reconcile only upserts) #4210) closed or verified already-fixed, the contract statement landed, and the inventory complete.
Acceptance criteria
Filed by the design architect (pass 37, 2026-11-02) as Phase 4 of design #4302. Gated on Phases 1–3 (#2456 + #2982, #2694 + #2455 + #3087, #4158 + #4210) landing; stays status/blocked until then. Triage: record the gating and enqueue the implementation follow-up once the gating clears; do not start the audit early. Activitydezren39 commented on Nov 2, 2026
Design architect, pass 37 (2026-11-02): this issue is Phase 4 (closing audit) of design #4302 — a projection writes only what the event proves. It is gated on Phases 1–3 landing (Phase 1 = #2456 + #2982, Phase 2 = #2694 + #2455 + #3087, Phase 3 = #4158 + #4210) and carries status/blocked until then; its triage packet is enqueued in the pilot queue so triage can record the gating. Do not start the audit before Phases 1–3 land. The four required dispositions (transferred issues; the item row's new Date() fallback at projector.ts:43; recordPush dedupe under Phase 1; secondary comment fields under the absence rule) are in the issue body — disposition each on #4302 with its reason. dezren39 commented on Nov 2, 2026
state: picked_up
worker: repo-worker-code
task_id: 6176
at: 2026-11-02T09:44:12Z
Claimed for triage. Revalidating the Phase 1–3 gate against current GitHub/main; the audit remains gated, and no implementation PR will be started. dezren39 commented on Nov 2, 2026
state: triaged
worker: repo-worker-code
task_id: 6176
follow_up_task_id: 6179
at: 2026-11-02T09:47:03Z
Verdict: the Phase 4 scope is independently landable as written once its gate clears; no rescope is needed. Current main and origin/main are both 62f2f34.
Gate is NOT clear; do not start the audit. Phase 1: #2456 is open with Drew-owned PR #4186 open (test failed); #2982 is open with Drew-owned PR #4273 open (test queued). Phase 2: #2694 is open with Drew-owned PR #3132 open; #2455 is open with Drew-owned PR #4189 open (test failed); #3087 remains open and no related PR surfaced. Phase 3: #4158 and #4210 remain open and queue/queued; no related PR surfaced. No named phase PR was touched.
Enqueued implementation follow-up task 6179 with the issue acceptance criteria intact and a 24-hour not-before gate (2026-11-03T09:46:22Z); its packet requires another fresh gate check and forbids starting unless all seven origins are closed or verified already fixed. Keep #4303 status/blocked until then. dezren39 commented on Nov 2, 2026
state: done
worker: repo-worker-code
task_id: 6176
follow_up_task_id: 6179
at: 2026-11-02T09:47:42Z
Triage completed and recorded in the queue. Follow-up 6179 is queued with a 24-hour not-before; #4303 remains status/blocked until the Phase 1–3 gate clears. Sandbox backlog/sweep bookkeeping is deferred to fleet reconciliation as requested. dezren39 commented on Nov 13, 2026 agent note (repo-worker-code, lane code-a, task 6179): Phase 1-3 gate re-checked fresh, 2026-11-13 (per the 2026-11-13 blocked-review steer, blocked-review-fleet-02#2).
Gate status — NARROWED from three open items to one:
#3087's fix exists: PR #7814 (task 12670, completed as pr_opened; head 078b609, local projector suite 116 tests green at open). It is NOT mergeable as-is: Codex left an unaddressed P2 finding — existing webhook-projected review rows carry fabricated delivery-time source_updated_at values; after the constructor switch, later review webhooks carrying the true (earlier) submitted_at are refused by the store's monotonic upsert guard, permanently freezing those rows. The finding asks for a migration/repair normalizing stored review timestamps before the source switch. Until that is dispositioned and PR #7814 merges (closing #3087), the Phase 4 gate does not clear and #4303 must not start.
Task 6179 re-blocks dep-blocked on issue #3087 only (it auto-releases when #3087 closes). A follow-on fix packet for the PR #7814 migration finding is enqueued separately so the gate's last item has an owner. dezren39 commented on Nov 14, 2026
agent-note:v1
state: gate cleared
This issue's start gate — "Gated on Phases 1–3 of #4302 landing; do not start the audit before they land" — has CLEARED:
- Phase 1: projector(webhook): a delivery that fails to apply can never be retried — its error row makes every redelivery a 'duplicate', and push events are lost permanently #2456 CLOSED, projector(webhook): a missing X-GitHub-Delivery header collapses every later delivery into the first one's identity — distinct events are silently dropped as 'duplicate' #2982 CLOSED. Phase 2: projector(comments): pmp_comments is keyed by the bare GitHub numeric ID — an issue comment, a review comment and a review with the same ID silently overwrite each other #2694 CLOSED, projector(comments): a deleted comment is resurrected by any stale upsert — the comments monotonic guard keys on created_at and markCommentDeleted never advances it #2455 CLOSED, projector(reviews): webhook reviews get a fabricated created_at (delivery time, not submitted_at) — reconcile's correct row is then guard-refused forever #3087 CLOSED. Phase 3: projector(items): an issues/issue_comment event for a merged PR resets merged to 0 and clears merged_at — issue-shaped payloads carry no merge fields #4158 CLOSED, projector(items): an issues deleted event is upserted, not removed — deleted GitHub issues stay in pmp_items forever (no delete path exists, and reconcile only upserts) #4210 CLOSED (fixed via PR fix(projector): remove items on issues deleted events (#4210) #6775).
- Contract markers are in the code at origin/main 0f95933 (commentKey / missing_delivery_id / deleteItem in pm-stack/projector/src/), and design Design: a projection writes only what the event proves — one application contract for the PM projector #4302 is being closed with this evidence by task 15224.
Nothing in this note changes this issue's queue state: its blocked labels/task stand until its next claimer or the dependency checker releases it — this note is the evidence that the release condition is met. First step for that claimer: the schema.sql header / README contract statement (scope item 1 on this issue).
dezren39 commented on Nov 14, 2026 Blocked-until checker: condition fired on 2026-11-14.
Gate: developing-today/code#3087 (issue-closed)
Evidence: developing-today/code#3087 state=CLOSED merged_at=None (need issue-closed)
Action: queue task(s) 6179 released to queued (fleet-queue events kind=condition_fired, worker blocked-until); labels synced to queue/queued.
Registry item: sweep-2026-11-13-task-6179 dezren39 commented on Nov 16, 2026
Agent note — done (Phase 4 audit complete; PR link in the closing comment thread / below), task 6179 for issue #4303 (lane any-c)
- Gate revalidated fresh: Phase 4 (audit) of #4302 — closing writer inventory + contract statement for the PM projector #4303 OPEN; all seven origin issues CLOSED (projector(webhook): a delivery that fails to apply can never be retried — its error row makes every redelivery a 'duplicate', and push events are lost permanently #2456, projector(webhook): a missing X-GitHub-Delivery header collapses every later delivery into the first one's identity — distinct events are silently dropped as 'duplicate' #2982, projector(comments): pmp_comments is keyed by the bare GitHub numeric ID — an issue comment, a review comment and a review with the same ID silently overwrite each other #2694, projector(comments): a deleted comment is resurrected by any stale upsert — the comments monotonic guard keys on created_at and markCommentDeleted never advances it #2455, projector(reviews): webhook reviews get a fabricated created_at (delivery time, not submitted_at) — reconcile's correct row is then guard-refused forever #3087, projector(items): an issues/issue_comment event for a merged PR resets merged to 0 and clears merged_at — issue-shaped payloads carry no merge fields #4158, projector(items): an issues deleted event is upserted, not removed — deleted GitHub issues stay in pmp_items forever (no delete path exists, and reconcile only upserts) #4210). The stale
status/blocked / queue/queued labels on this issue are cleared with this note.
- Contract statement landed in
pm-stack/projector/schema.sql (header) and README.md ("Projection contract (Design: a projection writes only what the event proves — one application contract for the PM projector #4302, audited in Phase 4 (audit) of #4302 — closing writer inventory + contract statement for the PM projector #4303)"), replacing the stale "a redelivered webhook applies at most once" wording and the stale pmp_comments guard comment.
- Writer inventory complete in the README beside the contract: every applyEvent branch, every reconcile stream,
recordPush, the delivery writers, and the /links writers, each dispositioned conforms / fixed / follow-up.
- Slip fixed here: the webhook review writer fabricated
created_at + guard key from delivery time (decision 4 violation, probe-verified: row showed 2026-11-16 "now" vs the review's 2026-10-25 submitted_at). Both now derive from submitted_at; regression assertions added; projector suite 158/158 pass.
- Four required dispositions recorded on Design: a projection writes only what the event proves — one application contract for the PM projector #4302: transferred → delete decided, implementation follow-up [projector] transferred issues: delete the source-repo row (Phase 4 disposition D-1, #4303) #10673 (no captured payload exists; key semantics unverified — fixture first); item-row
new Date() fallback → deliberately local with reason; recordPush dedupe → verified end-to-end; secondary comment fields → checked, full-row overwrite is sound, no change. The invalid_json deviation from decision 2's pin is recorded in the README with its reason and its pinning e2e test.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|