Repository navigation
Description
DST-05 — Versioned desired/observed snapshot reconciler with dirty cursor + full audit. Owns proposed pm-stack/projector/src/priority-reconcile.ts, test/priority-reconcile.test.ts
Issue title: design(pm-orchestration): Versioned desired/observed snapshot reconciler with dirty cursor + full audit. Owns proposed pm-stack/projector/src/priority-reconcile.ts, test/priority-reconcile.test.ts
Design parent: #9200 · Scope: #9200 priority distribution · Version: V3 proposal; not an authorization to implement. Requirement IDs (ALLOCATED): C-R066, C-R068, C-R077, C-R079, H-R005, H-R012, O-R001, O-R018. Slice status: curated implementation/research slice. Pinned baseline: a038f084dbeb525494d7bb928ad91f597db2ac51.
This batch creates design/research/validation handoff issues only. After PR #9225 is merged and this slice's granular prerequisites are resolved, a separately scoped implementation issue may be filed; production adoption, migration, deployment, and live acceptance remain separately authorized stages. The local FDR decisions are accepted design defaults; global #9180 registration is pending and is not a blocker to this bounded design work.
Goal and deliverable
Versioned desired/observed snapshot reconciler with dirty cursor + full audit. Owns proposed pm-stack/projector/src/priority-reconcile.ts, test/priority-reconcile.test.ts.
Curated requirement trace
- C-R066 — partially implemented (requirement); basis: exact frozen implementation_slice_keys inverse join; support rationale: none; occurrences
C-093; citations: 02_charter_v1_1.md#C-093:68; design: components/9200-priority-distribution.md#authority-and-precedence-table-proposal; outcome: GitHub labels, Projects and PM Stack projections; residual: See status reason and missing_evidence; implementation slices are local keys, not issue IDs.; missing evidence: exact implementation/parser tests for the full behavior, deployment/live acceptance unless separately cited - C-R068 — partially implemented (requirement); basis: exact frozen implementation_slice_keys inverse join; support rationale: none; occurrences
C-095; citations: 02_charter_v1_1.md#C-095:70; design: components/9200-priority-distribution.md#authority-and-precedence-table-proposal; outcome: An authorized external priority-label addition is an input command: translate to the configured band default or an appropriate retained intra-band score; remove mutually exclusive labels and reproject; residual: See status reason and missing_evidence; implementation slices are local keys, not issue IDs.; missing evidence: exact implementation/parser tests for the full behavior, deployment/live acceptance unless separately cited - C-R077 — design-only (requirement); basis: exact frozen implementation_slice_keys inverse join; support rationale: none; occurrences
C-104; citations: 02_charter_v1_1.md#C-104:74; design: components/9200-priority-distribution.md#authority-and-precedence-table-proposal; outcome: The aggregator/projector/board are projections and authorized control surfaces, not new owners of the same fields; residual: See status reason and missing_evidence; implementation slices are local keys, not issue IDs.; missing evidence: exact implementation/parser tests for the full behavior, deployment/live acceptance unless separately cited - C-R079 — design-only (requirement); basis: exact frozen implementation_slice_keys inverse join; support rationale: none; occurrences
C-106; citations: 02_charter_v1_1.md#C-106:74; design: components/9200-priority-distribution.md#authority-and-precedence-table-proposal; outcome: Use PM Stack's existing Kaneo, Pad, Grist, aggregator, projector, and dispatch boundaries rather than merging service databases by fiat; residual: See status reason and missing_evidence; implementation slices are local keys, not issue IDs.; missing evidence: exact implementation/parser tests for the full behavior, deployment/live acceptance unless separately cited - H-R005 — partially implemented (requirement); basis: exact frozen implementation_slice_keys inverse join; support rationale: none; occurrences
H-092, H-093, H-094, H-095, H-096; citations: 01_handoff_pm_stack_fleet_orchestration.md#H-092:71, 01_handoff_pm_stack_fleet_orchestration.md#H-093:71, 01_handoff_pm_stack_fleet_orchestration.md#H-094:71, 01_handoff_pm_stack_fleet_orchestration.md#H-095:71, 01_handoff_pm_stack_fleet_orchestration.md#H-096:71; design: components/9200-priority-distribution.md#minimal-event-identity-revision-snapshot-and-receipt; outcome: Treat priority distribution as its own design: trace producers/consumers and specify authoritative policy, precedence, stable IDs, versioned payloads, provenance/reasons, replay/reconciliation, cross-target ordering, and hard eligibility separation.; residual: See status reason and missing_evidence; implementation slices are local keys, not issue IDs.; missing evidence: exact implementation/parser tests for the full behavior, deployment/live acceptance unless separately cited - H-R012 — partially implemented (requirement); basis: exact frozen implementation_slice_keys inverse join; support rationale: none; occurrences
H-069, H-070, H-071, H-072; citations: 01_handoff_pm_stack_fleet_orchestration.md#H-069:54, 01_handoff_pm_stack_fleet_orchestration.md#H-070:55, 01_handoff_pm_stack_fleet_orchestration.md#H-071:56, 01_handoff_pm_stack_fleet_orchestration.md#H-072:57; design: components/9200-priority-distribution.md#authority-and-precedence-table-proposal, components/9201-pm-projection-mobile-control.md#32-action-request--result-contract, components/9203-direct-dispatch-slash-commands-event-routing.md#31-inbound-sources-and-strict-command-surface; outcome: Preserve authenticated labels/comments/commands, single-writer projection, separate hierarchy/hard dependencies, live-session routing, authorized direct dispatch, durable receipts, and idempotent webhooks.; residual: The existing projector is bounded transport/projection only. Canonical Fleet operation acceptance, per-action authorization, semantic event idempotency, lifecycle/priority mutation routing and direct launch/bind/ack remain unproven or open.; missing evidence: authoritative Fleet command acceptance and operation receipt, full comment/slash-to-session/direct-launch route, deployment/live ingress and consumer fanout evidence, do not use projector database as canonical truth - O-R001 — design-only (requirement); basis: exact frozen implementation_slice_keys inverse join; support rationale: none; occurrences
O-174, O-175, O-176, O-177, O-178, O-179, O-180, O-181, O-182, O-183, O-184, O-185, O-186, O-187, O-188, O-189, O-190, O-191, O-192, O-193, O-194, O-195, O-196, O-197; citations: 04_recovered_original_combined_design.md#O-174:13, 04_recovered_original_combined_design.md#O-175:13, 04_recovered_original_combined_design.md#O-176:13, 04_recovered_original_combined_design.md#O-177:13, 04_recovered_original_combined_design.md#O-178:13, 04_recovered_original_combined_design.md#O-179:13, 04_recovered_original_combined_design.md#O-180:13, 04_recovered_original_combined_design.md#O-181:13, 04_recovered_original_combined_design.md#O-182:13, 04_recovered_original_combined_design.md#O-183:13, 04_recovered_original_combined_design.md#O-184:13, 04_recovered_original_combined_design.md#O-185:13, 04_recovered_original_combined_design.md#O-186:13, 04_recovered_original_combined_design.md#O-187:13, 04_recovered_original_combined_design.md#O-188:13, 04_recovered_original_combined_design.md#O-189:13, 04_recovered_original_combined_design.md#O-190:13, 04_recovered_original_combined_design.md#O-191:13, 04_recovered_original_combined_design.md#O-192:13, 04_recovered_original_combined_design.md#O-193:13, 04_recovered_original_combined_design.md#O-194:13, 04_recovered_original_combined_design.md#O-195:13, 04_recovered_original_combined_design.md#O-196:13, 04_recovered_original_combined_design.md#O-197:13; design: components/9198-requirement-crosswalk-current-state-census.md#2-v1-census--actual-state-and-bounded-facts, components/9200-priority-distribution.md#minimal-event-identity-revision-snapshot-and-receipt; outcome: Make Fleet, GitHub/Projects, PM Stack, scheduling, mobile and live sessions share a coherent view of urgency, importance, readiness, ownership and lifecycle; prevent forgotten work, inflation, stale pivots, buried blockers, cluster bias, unstable ties, oscillation, drift, delayed dispatch and lost parking context.; residual: See status reason and missing_evidence; implementation slices are local keys, not issue IDs.; missing evidence: exact implementation/parser tests for the full behavior, deployment/live acceptance unless separately cited - O-R018 — design-only (candidate); basis: exact frozen implementation_slice_keys inverse join; support rationale: none; occurrences
O-699, O-700, O-701, O-702, O-703; citations: 04_recovered_original_combined_design.md#O-699:13, 04_recovered_original_combined_design.md#O-700:13, 04_recovered_original_combined_design.md#O-701:13, 04_recovered_original_combined_design.md#O-702:13, 04_recovered_original_combined_design.md#O-703:13; design: components/9200-priority-distribution.md#authority-and-precedence-table-proposal; outcome: Keep Fleet as canonical urgency/source owner and PM/GitHub projections non-authoritative; route mutations through shared service and reconcile idempotently.; residual: See status reason and missing_evidence; implementation slices are local keys, not issue IDs.; missing evidence: exact implementation/parser tests for the full behavior, deployment/live acceptance unless separately cited
Deliver this bounded slice only. It enables downstream work only after its stated contracts and prerequisites are accepted; it does not imply that other component specs, closed parent issues, source code, tests, deployments, or runtime behavior are complete.
Owned files and boundaries
pm-stack/projector/src/priority-reconcile.tspkgs/fleet/crates/fleet-queue/test/priority-reconcile.test.ts
Explicit read-only consumers (not writable ownership): none declared.
Use the existing Fleet queue/PM Stack/adapter owners named in the design; do not add a queue, database, scheduler, service, resolver, executable, GitHub client, or general creation-outbox producer. Shared CLI glue remains owned by the single CLI-13 registration slice. Do not edit #6533 or duplicate its live acceptance; consume #9028/#9073–#9076/#9079/#9081/#9178/#9179/#3424/#8575/#8579 as applicable, not as replacement work.
Prerequisites and sequencing
Hard blockers named by the source slice, after granular-key normalization: No inferred hard edge is added at preparation time; parent integration must resolve granular contracts before the native graph is applied.
File-collision sequencing edges added by stable topological serialization: none.
Existing issue references retained as non-blocking runtime/evidence gates: none.
Domain-starter parent references are never emitted as hard native blockers. Source parents normalized to granular slices or runtime gates: none.
Source-local candidate aliases normalized for this packet: DST-INTENT-01 → REL-03; DST-SNAPSHOT-01 → DST-05; DST-RECON-01 → DST-05.
Use only granular issue-key edges after all keys are resolved. Never make a whole domain starter a hard blocker when it creates a cycle. File collisions are hard sequencing edges. Parent integration adds native parent/blocker edges in a later pass after the command map, requirements IDs, and acyclic graph are verified.
Starting failing test, oracle, and done check
- First failing test:
pmo_distribution_projection_replay - Oracle: The source slice’s stated reference model, golden fixture, or invariant; compare expected and observed state explicitly. No mock-only claim of deployed/live behavior.
- Done command:
cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet-queue --lib --features client,queue-broker pmo_distribution_projection_replay - Tests must first be listed by exact name in the owning target (
-- --list); assert the test exists before execution. A zero-test filter passing is not acceptance.
Acceptance and negative cases
Versioned desired/observed snapshot reconciler with dirty cursor + full audit. Owns proposed pm-stack/projector/src/priority-reconcile.ts, test/priority-reconcile.test.ts.
Negative coverage: stale input, duplicate/replay, ambiguous resource, unauthorized actor, partial remote effect, unknown version, and no false verified/completed result where applicable.
Compatibility, migration, and runtime gates
- Preserve the current queue/status/identity/Project-writer/Fleet
ghcompatibility surfaces. Do not silently change existing spellings or normalize ratifiedexpedite=15/next-up=25; those remain distinct fromdo_now. - QTI remains unlocated/unverified; research(pm-orchestration): recover Queue Table Improvements provenance and schema crosswalk #9241 is the existing provenance-recovery issue. design(queue): durable task data model — blocker links, park revalidation, status reasons + notes, full event history, actor provenance #3424/Design: one door, one home per fact — the fleet tool owns every route and every fallback #8575/Fleet unification slice 1: wipe-test audit of the queue database schema #8579/docs(fleet): #8579 wipe-test audit of the queue database schema #8602 are candidates/constraints, not presumed equivalents. Any overlapping persisted field/schema change waits for the QTI crosswalk and named current owner.
- Runtime gates: implementation starts only after the document PR is merged, the exact curated requirement IDs are integrated, and this issue's granular prerequisite edges are resolved. Schema/migration, production rollout, telemetry, authenticated remote writes, deployed behavior, and live acceptance each require their own explicit evidence and approval. Normal triage does not inherit urgency 450/Do Now.
- Projection rows being rebuildable/disposable does not authorize deleting the PM PostgREST database or unrelated tables. Preserve unique human-authored
pmp_links/link writes and all unrelated tables; follow the existing backup/restore requirements before any future migration or cleanup. - Compatibility: Additive and reversible only after existing owner/schema review; retain prior data and behavior; no silent fallback or dual authority.
- Rollback: Disable only the new capability; preserve pending intents, artifacts, existing state, and remote effects. No broad reset, destructive cleanup, or deletion of history.
Source trail
- Raw source refs: handoff
sources/01_handoff_pm_stack_fleet_orchestration.md; chartersources/02_charter_v1_1.md; recovered originalsources/04_recovered_original_combined_design.md; cited source section(s) insources/03_full_orchestration_proposal.mdas named by the component; exact occurrence citations are in the curated trace above when allocated. - Design ref:
components/9200-priority-distribution.md, sliceDST-05(proposal only). - Prior-art/evidence receipts:
research/track-a-state-of-art.md,research/track-b-state-of-art.md,research/track-b-sources.json; additional exact evidence anchors for this slice: see the pinned census and component evidence links above. - Parent-approved support mapping (validation/expansion support only, not a direct slice-key match): none.
- Existing external requirement refs not assigned a new curated ID: none.
- Command allocation:
none; this is not a command-owning slice. Full command inventory remainscensus/commands.jsonl; exact allocation source iscensus/command-slice-map.jsonl(215 rows, no wildcard). V1 baseline keys are not refiled as duplicate implementation issues. - Shared architecture:
architecture.md; FDR index:decisions/README.md(all FDR-PMO records remain proposed, not ratified).
Original slice text (preserved)
| DST-05 / recommended | Versioned desired/observed snapshot reconciler with dirty cursor + full audit. Owns proposed pm-stack/projector/src/priority-reconcile.ts, test/priority-reconcile.test.ts. | DST-INTENT-01, DST-SNAPSHOT-01, DST-RECON-01; Project single-writer baseline | Reorder/duplicate/outage/rate-limit/partial-effect fixtures converge or report conflict; full scan finds omitted dirty marker; no second Project writer. |
Future red-first test commands / oracles per issue: Exact future Rust test commands are: DST-01 cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet-queue --lib --features client,queue-broker pmo_distribution_command_identity_reason_and_version; DST-03 cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet-queue --lib --features client,queue-broker pmo_distribution_atomic_intent_revision; DST-05 cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet-queue --lib --features client,queue-broker pmo_distribution_projection_replay; DST-06 cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet-queue --lib --features client,queue-broker pmo_distribution_host_order_hash; DST-07 cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet-queue --lib --features client,queue-broker pmo_distribution_unknown_version_degrades. Before each, run that exact command with -- --list and assert the named test exists; zero-test success is not acceptance. DST-01 oracle enumerates each reason code and checks field-effect class/no mutation on rejection or unsupported code. DST-02: cd pm-stack/dispatch && bun test test/validate.test.ts proves 15/25 round-trip exactly, not current snapping. DST-04 first asserts test -f pm-stack/projector/test/priority-webhook.test.ts, then runs cd pm-stack/projector && bun test test/priority-webhook.test.ts; DST-05 likewise asserts test -f pm-stack/projector/test/priority-reconcile.test.ts before cd pm-stack/projector && bun test test/priority-reconcile.test.ts. Both projector oracles cover replay, stale revision, partial effects and readback repair. These are future red-first specs, not current tests. No test may trust actor_ref or client-supplied authorization. Hard blockers are granular keys above; #9079/#9081 hosted and #9201 mobile are soft consumers.
Activity
developing-today commentedon Nov 13, 2026
CODE-3077
dezren39 commentedon Nov 13, 2026
Triage (repo-health fleet, lane any-a, task 15917) — findings and routing:
pmo_distribution_projection_replay: done command runs 0 tests, 292 filtered out; no source occurrence.test -f pm-stack/projector/test/priority-reconcile.test.tsfails, and the owned source file pm-stack/projector/src/priority-reconcile.ts does not exist either. When written, the oracle must cover replay, stale revision, partial effects and readback repair.40 remaining items
dezren39 commentedon Nov 25, 2026
Design of record merged in #15306:
doc/2026-11-25T23-35-00Z_design_dst05_priority_snapshot_reconciler/.It settles the slice header's test-path contradiction: the
pmo_distribution_tests go inpkgs/fleet/crates/fleet-queue/src/work/distribution.rs(so thecargo --libdone command finds them) and the TypeScript test goes inpm-stack/projector/test/priority-reconcile.test.ts.priority-reconcile.tsstays read-only, with no GitHub writes and no Project writes.Implementation stays gated on REL-04's outbox and REL-06's read-back, plus the registry entries for the two new digest domains (§10). Leaving this issue open for the implementation stage.
Generated by Claude Code
docs(design): DST-05 versioned desired/observed priority snapshot rec…
developing-today-fleet commentedon Nov 26, 2026
DST-05 gate revalidation (OpenChamber code-h, task 16081; 2026-11-26): PR #9225 is merged, and the DST-05 design record is merged in #15306. The latest design-of-record note on this issue says implementation remains gated on REL-04 outbox, REL-06 read-back, and registry entries for the two new digest domains. Those are not clear: REL-04 tracker #9514 remains OPEN; its latest note says the store-level transaction/rollback proof is unmet and CEN-04 admission plus sequencing prerequisites remain. REL-06 tracker #9516 remains OPEN; its latest release note lists REL-03 (#9513), REL-04 (#9514), AUTH-01 (#9429), AUTH-02 (#9499), and CEN-04 (#9434) as unresolved implementation gates. The digest-domain registry entries are also not evidenced by the merged design PR. Therefore no implementation is authorized yet; returning task 16081 to the dependency-blocked queue, on the concrete REL-04/REL-06 gate issues rather than the #9200 container. No source changes made.
developing-today-fleet commentedon Nov 29, 2026
agent-note:v1 — audit slice N7 graph correction (Felix lane 0640-C, 2026-11-29; Refs #14863)
The 2026-11-26 gate revalidation named this issue's blocks textually (REL-04 outbox #9514, REL-06 read-back #9516) but no native edges existed. Fresh check: both #9514 and #9516 are OPEN. Action: added native blocked_by edges to #9514 and #9516. Status unchanged: verified-blocked.
dezren39 commentedon Nov 29, 2026
🤖 Census note · lane CEN-C08, 2026-11-29 full issue census. Verified firsthand: body + all comments read.
Verdict: blocked. Design record merged. Felix's audit note today (2026-11-29) added the missing native blocked_by edges: #9514 (REL-04 outbox) and #9516 (REL-06 read-back), both OPEN — the block is live and now graphed. Census fix: added missing
priority/normal.developing-today-fleet commentedon Nov 29, 2026
Census 2026-11-29 (Felix): full recheck of this issue — body, all 23 comments, labels, and native blocked_by edges read firsthand; blocker states verified live today. A census note from lane CEN-C08 is already on this issue today; per Drewry's order I rechecked everything firsthand anyway — this comment is my own record and lists only what I verified or changed.
STRENGTHS
GAPS
FIXES I APPLIED
REMAINS
developing-today-fleet commentedon Nov 30, 2026
🤖 Reparented #9200 → #9196 (Felix lane 0640-VX, P3.1 tranche for #17071, claim 7283234479 on #17071). This issue's native parent #9200 is closed; per the P0–P3 playbook's P3.1 (open sub-issues should not roll up into a closed parent), it was detached from #9200 and attached to #9200's own open parent #9196 — the same PM Stack epic container used for the #9207 tranche. Labels, band, and state untouched; verified live immediately before the move (no safety label present).