Repository navigation
docs(pm-orchestration): build out both orchestration design tracks - #9225
Conversation
|
Important Review skippedToo many files! This PR contains 164 files, which is 64 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a0811efc50
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if source_id == "O": | ||
| pattern = r"(?<!\S)#{1,6}\s+([^\n]+)" | ||
| found = list(re.finditer(pattern, text[:offset])) | ||
| return found[-1].group(1).strip() if found else "front matter / unsectioned source text" |
There was a problem hiding this comment.
Bound section extraction for the flattened original
For source O, the flattened body has no newlines between headings, so [^\n]+ consumes everything from the first heading to the current occurrence instead of identifying its containing section. Consequently, later occurrences have progressively larger, incorrect section locators: O-1311 stores 82,497 characters in locator.section. These repeated prefixes inflate statements.jsonl to about 59 MB, with section strings accounting for roughly 96% of its contents. Use bounded heading extraction, or retain an explicit unsectioned locator and the existing exact byte spans when headings cannot be recovered reliably, then regenerate the ledger.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Disposition (task 15381, head ddc7e8f): verified not present in the current artifacts. The 59 MB statements pipeline this thread reviewed was superseded by the curated ledger: inventory/dispositions.jsonl carries no section text at all, and inventory/statements.jsonl sections are bounded — check_inventory.py --check rejects any section over 160 chars, and the measured maximum across all 1,311 flattened-source (O) rows at this head is exactly 160. No code change needed; closing as verified-absent.
| # Mechanical occurrence segmentation only. Whitespace and sentence-ending | ||
| # punctuation are delimiters (not occurrences); dots attached to path or | ||
| # identifier text, e.g. .fleet, remain part of the occurrence. | ||
| for m in re.finditer(r"\S(?:.*?\S)?(?=(?:[.!?](?:[\"')\]]*)?\s+)|\n|$)", text, re.S): |
There was a problem hiding this comment.
Preserve the final source clause before trailing whitespace
When the final source clause ends with horizontal whitespace before its terminating newline, this expression cannot end its match at the last non-whitespace character and silently omits the clause. This already affects 05_supplemental_raw_note.md: the ledger stops at S-065, leaving the final 177 characters uncovered, including “make all the numbers configurable and build tooling so as little as possible has to be manually done by agent”. Because --check regenerates its expected rows using the same expression, its sequence comparison cannot detect this preservation failure. Accept trailing whitespace at the end of the source and independently verify that uncovered spans contain only permitted separators before regenerating the artifacts.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Disposition (task 15381): REAL and FIXED in ddc7e8f. Root cause confirmed in split_units: a unit ending in horizontal whitespace before the final newline could not terminate, so the clause after S-065 was dropped from both ledgers. The segmentation now has a trailing-whitespace-at-EOF lookahead; the ledger was regenerated (3,571 -> 3,572 occurrences) and the recovered clause is statement/disposition S-066 (bytes 11481-11684, chars 9870-10043), mapped as a qualifier of S-R011 and added to S-R011 source_occurrence_refs. check_inventory.py --check and check_requirements.py --check both pass: 3,572 dispositions cover every seed occurrence exactly once.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9bd3289ca3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| Only true hard dependency edges gate eligibility or contribute inheritance. Parent/child hierarchy and advisory/related/duplicate edges do not automatically block or inherit pressure. Preserve blocker intrinsic urgency; calculate effective pressure from downstream urgency/critical path with bounded consideration of effort, actionability, probability and alternatives. The explanation includes source item(s), edge type, graph revision, path, values/cap, effort/alternative evidence. Never unconditionally promote a large speculative blocker to Emergency. | ||
|
|
||
| Canonical hard-block edge direction is **blocker → dependent**. For proposed insertion `u→v`, a cycle is created iff `u==v` or the current graph has a directed path `v→u`; check this exact orientation before commit under a serialized graph revision/edge-write transaction. Opposite-edge race fixture: concurrent requests insert `A→B` and `B→A`; independently checking an initially empty graph is insufficient—one commit wins, the second rechecks the new revision and rejects/quarantines. Imported cycles are quarantined/reported and traversal uses visited nodes. A full DAG propagation is `O(V+E)`; cache invalidation marks downstream dependents. Selection takes a pinned graph revision and retries/rejects if it changed before claim. Resource budget/cancel behavior may bound work, but **must not silently truncate a blocker graph and return an apparently valid eligibility result**; return `graph_evaluation_incomplete` and fail closed for dependent decisions. |
There was a problem hiding this comment.
Invalidate inherited-pressure caches toward blockers
When a dependent’s urgency changes in A → B, downstream-only invalidation does not invalidate blocker A, even though the preceding contract derives A’s effective pressure from B. An implementation following this cache rule can therefore keep selecting on stale inherited urgency after an escalation or de-escalation. Specify upstream invalidation through blockers for inherited-pressure caches; downstream invalidation is appropriate separately for dependency readiness.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Disposition (task 15381): FIXED in ddc7e8f. The 9199 contract now specifies bidirectional invalidation: downstream dependents for eligibility effects, and upstream blockers for inherited-pressure recomputation — a dependent urgency change invalidates its blockers inherited-pressure caches, as this thread required.
…ed design contracts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87ea002531
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| ## V3 — staged implementation, migration, and rollback | ||
|
|
||
| Any additional fence/version/outbox fields/tables must use existing queue source-of-truth and migration owner after Queue Table Improvements reconciliation. Additive migration with legacy rows mapped to generation 0/unknown and unclaimed state; never assume current worker IDs imply token/generation. Dual-read/observe before switching claim writes; no dual writers with divergent authority. For outbox expand only behind a new producer capability, leave creation pilot unchanged, backfill no fictitious remote intent. Rollback disables new operation producer/claim contract while preserving pending records for explicit drain; cannot erase already-applied remote effects. Migration test: upgrade, mixed old/new client behavior, rollback before and after remote effect, restart recovery, data/receipt integrity. Deployment gate requires canary/telemetry and queue-table owner approval. |
There was a problem hiding this comment.
Preserve active legacy leases during fence migration
When upgrading a queue with outstanding V1 claims, mapping all legacy rows to an unclaimed state discards valid ownership while the existing workers may still be executing. Those tasks can then be claimed again, allowing concurrent execution and remote effects by both workers; initializing a fence generation does not stop the legacy worker. Preserve active legacy ownership and lease expiry with an explicitly unknown generation, or require a verified drain before converting those rows to unclaimed.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Disposition (task 15381): FIXED in ddc7e8f. The V3 migration text in 9209 now reads: a row carrying an active lease retains its claimed state, owner, and lease expiry under generation 0/unknown and is not claimable until that lease expires or a verified drain completes — only rows with no active lease map to unclaimed state.
|
|
||
| ### HYD-08 — Bounded refresh/watch/reconcile CLI and capability contract | ||
|
|
||
| **Tier:** recommended. **Goal:** implement bounded `hydrate`, `refresh`, `changes`, `activity reconcile`, `watch` service behavior mapped to shared contracts. **Owns:** `pkgs/fleet/crates/fleet-queue/src/work/context.rs` and `activity.rs` unit tests; does not own `fleet/src/main.rs`, registry or shared CLI integration files (one #9206 integration slice owns those). **Hard blockers:** granular #9206 Command/Result contract and shared CLI-registration slice; HYD-04–06. #9203 live event routing excluded. **First failing oracle:** `pmo_hyd_refresh_timeout_returns_resumable_cursor_receipt` tests deadline/cancel without worker spawn. **Done command:** verify test listed, then `cargo test --manifest-path pkgs/fleet/Cargo.toml -p fleet-queue --lib --features client,queue-broker pmo_hyd_refresh_timeout_returns_resumable_cursor_receipt`. Shared CLI acceptance belongs its owner and has a separate named golden help/JSON test. **Negative:** ambiguous resource, unsupported include advertised, timeout returns success or fictional cancellation, watch spawns hidden poller. **Migration:** additive only; no queue rename. Deployment/runtime separate. |
There was a problem hiding this comment.
Keep hydration services upstream of CLI registration
When these hard blockers are used to schedule implementation, HYD-08 must wait for shared CLI registration, but CLI-13 explicitly runs last and blocks on every handler it registers (9206-work-item-lifecycle-fleet-subcommands.md, lines 346 and 388–389). The authoritative census/command-slice-map.jsonl assigns work.refresh, activity.reconcile, and activity.watch to HYD-08, so registration also needs this slice's handlers. This creates a circular prerequisite that prevents those commands from progressing. Remove registration from HYD-08's hard blockers and keep CLI-13 downstream of the service implementation.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Disposition (task 15381): FIXED in ddc7e8f. The 9206 sequencing text was over-broad: CLI-13 is last among the CLI slices and blocks on the CLI-02..CLI-12 interfaces it registers; domain handler slices outside the CLI family (HYD-08 with work.refresh / activity.reconcile / activity.watch) register afterwards through the mechanism CLI-13 delivers. That matches the filed graph — HYD-08 is blocked by CLI-13 (issue #9507 native edges verified by readback) and CLI-13 is not blocked by HYD-08 — so the registration graph is acyclic.
Task 15381 publication pass: 91 canonical issues #9429-#9519 filed under domain starters #9198-#9209 with native parents, 245 verified blocked-by edges, and a live repo-health-code-pilot triage task each. Publisher fixes: compact queue packets under the 16384-byte ceiling (pointer evidence, requirement_ids, command_keys, hard size guard) and GitHub 65536-char body-limit compaction of the curated trace in 21 oversize bodies (full trace preserved in census/requirements-crosswalk.jsonl); 14 publisher tests pass. Live audit: 91/91 issues re-read exact, zero failures (reviews/publication-audit-2026-11-13.md).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…source-05 final clause as S-066 Task 15381 post-review pass. (1) check_inventory segmentation: trailing clause ending in horizontal whitespace at EOF was dropped by split_units; added the EOF lookahead, regenerated the ledger 3571 -> 3572, added S-066 (source 05 final clause) as a qualifier of S-R011, updated coverage checker constants; check_inventory and check_requirements both pass. (2) 9199: bidirectional cache invalidation (upstream blockers for inherited pressure). (3) 9209: active legacy leases retain ownership/expiry under generation unknown. (4) 9206: CLI-13 scope clarified to CLI-02..12 interfaces; domain handlers register afterwards (acyclic, matches filed graph). Finding r4559397776 (unbounded flattened sections) verified absent in current artifacts (max section 160).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
Preserve both tracks; extend existing Fleet/PM foundations, never replace them.
This PR is the documentation batch for the active mill. Related: #9196, #9198–#9209.
It does not close the program or authorize production implementation.
Evidence
doc/2026-11-13T03-20-24Z_design_pm-stack-fleet-orchestration/as the batch lands.a038f084dbeb525494d7bb928ad91f597db2ac51.reviewer results will be recorded before merge; no passing checks are claimed yet.
Merge Danger
Door: two-way
Design/research/traceability files only. No production queue, dispatch, schema, binary,
database, or resolver changes. New implementation remains separately queued work.
Blast Radius: documentation
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.