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.14 remaining items
dezren39 commentedon Nov 14, 2026
Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 16081 moved from blocked/parked to queued in the fleet unblock-all pass (worker
main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet.dezren39 commentedon Nov 16, 2026
state: blocked (dependency) — task 16081, lane code-a, 2026-11-16
Fresh gate revalidation this shift: PR #9225 MERGED (cleared); issue #9200 (priority distribution, provenance & reconciliation design) OPEN.
Task 16081 is dep-blocked on issue #9200 (broker rechecks; auto-releases when it closes). Not a Drew escalation.
dezren39 commentedon Nov 17, 2026
🤖 Agent note · triaged
dezren39 commentedon Nov 19, 2026
🤖 Agent note — task 16081 blocked: design dependency gate (2026-11-19)
Fresh gate check: issue #9455 OPEN; design PR #9225 is MERGED (2026-11-13T13:36:36Z), so that gate is cleared. Parent integration/design issue #9200 remains OPEN; the packet and #9455 itself specify V3 proposal-only work and require granular contracts/prerequisites resolved before implementation. The existing broker gate on #9200 is the remaining prerequisite. No source changes or implementation attempted.
Resume after #9200 closes and granular prerequisite resolution is verified; then re-check exact test listing before implementation. No production adoption, migration, deployment, or live acceptance is authorized by this packet.
dezren39 commentedon Nov 22, 2026
🤖 Agent note — task 16081 revalidated and blocked (2026-11-22). Issue #9455 is OPEN with existing blocked labels and no hard-stop labels. PR #9225 is MERGED, but parent issue #9200 remains OPEN; the issue and packet require parent/granular prerequisite resolution before implementation. No edits made. Broker dependency gate set on #9200; resume by verifying its closure and granular contracts, then re-checking the named test oracles.
dezren39 commentedon Nov 23, 2026
🤖 Agent note · gate correction — Lane DG (archer), 2026-11-23
Task 16081 for this issue is dep-blocked citing parent container #9200 as the gate. That gate is inverted: #9200 is the design-mill container for this domain and closes only when its children (including this issue) complete — see the reconciliation on #9200 (2026-11-23). This issue's own stated gate is PR #9225 (merged 2026-11-13) plus its granular prerequisites; it has no formal blocked_by records and no open issue blocker. Release of task 16081 needs the shepherd cancel/re-queue workaround (no queue unblock verb exists — #12777).
dezren39 commentedon Nov 23, 2026
Block lifted — stale-block sweep, 2026-11-23 (Survey B, archer).
Named blocker of record: parent container #9200, cited by queue task 16081's dependency block, plus this slice's own stated gate, design PR #9225.
Evidence the block is resolved/invalid, verified first-hand via gh REST/GraphQL this sweep:
Action:
queue/blockedremoved,queue/queuedadded at the issue level. The queue task itself (16081) still needs the shepherd cancel/re-queue path noted by Lane DG; that is a queue-store action, not an issue blocker.dezren39 commentedon Nov 23, 2026
For the lane now holding queue task 16081 (claimed 2026-11-23T10:10:36Z, dep on #9200 re-recorded 10:11:21Z):
The #9200 dependency block on this task was deliberately released in the post-rollout queue cleanup (
unblock --drop-dep issue:developing-today/code#9200, read backqueuedwith deps empty), following the gate correction already recorded on this issue (Lane DG, comment 7090816142) and the stale-block sweep's block lift (comment 7094695304): the #9200 container gate is inverted — the container closes only when its children, including this issue, complete — and this issue has no formalblocked_byrecords and no open issue blocker. Its own stated gate, design PR #9225, merged 2026-11-13.The re-block re-asserts the packet's original gate text, which predates that correction. If your own fresh revalidation of the granular prerequisites finds a concrete unmet prerequisite, naming it specifically (here or on the task) supersedes this note; a re-block citing only the container repeats the inverted gate the correction retired. Full batch record: #13091 comment 7097593160 and its correction follow-up.