release: promote orchestration and foundation reconciliation - #11
Conversation
…doff Promote the execution orchestration and handoff validation into dev after all hosted checks pass.
Promote FND-001 foundation reconciliation after all hosted checks pass.
📝 WalkthroughWalkthroughThe change adds execution-orchestration plans, a structured ledger, a handoff runbook, foundation reconciliation evidence, review disposition records, a repository validator, validation tests, and a Python-module pytest launcher update. ChangesExecution orchestration
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant RepoCheck
participant OrchestrationChecker
participant OrchestrationArtifacts
RepoCheck->>OrchestrationChecker: run orchestration validation
OrchestrationChecker->>OrchestrationArtifacts: load ledger, traceability, plans, and runbook
OrchestrationArtifacts-->>OrchestrationChecker: return repository artifacts
OrchestrationChecker-->>RepoCheck: emit JSON counts or sorted diagnostics
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 9
🧹 Nitpick comments (2)
docs/plans/003-luna-handoff-runbook.md (1)
172-172: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the bootstrap prompt task-conditional.
The execution loop requires PostgreSQL migration and tenant tests only when durable state changes. This prompt lists those tests and vertical client coverage as mandatory for every task. Add the same conditions here so documentation-only or UI-only tasks do not receive incorrect entry gates.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/plans/003-luna-handoff-runbook.md` at line 172, Update the bootstrap prompt in the runbook so PostgreSQL migration/tenant tests and vertical client/adapter coverage are required only when the task changes durable state or involves client behavior. Keep the remaining evidence and delivery requirements applicable to all tasks, while preserving the task-conditional entry-gate wording.tools/repo-cli/src/check-execution-orchestration.mjs (1)
5-26: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicate plan catalog across checker and test. The
expectedPlansMap (19 entries) andexpectedPriorityTotalsobject are duplicated verbatim between the checker script and its test. The shared root cause is the absence of a single source of truth for the plan catalog.
tools/repo-cli/src/check-execution-orchestration.mjs#L5-L26: moveexpectedPlansandexpectedPriorityTotalsinto a shared module (e.g.,tools/repo-cli/src/orchestration-plan-catalog.mjs) and import it here.tools/repo-cli/test/execution-orchestration.test.mjs#L18-L38: import the same shared catalog instead of redefining it.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tools/repo-cli/src/check-execution-orchestration.mjs` around lines 5 - 26, Create a shared orchestration plan catalog module containing the single definitions of expectedPlans and expectedPriorityTotals. In tools/repo-cli/src/check-execution-orchestration.mjs at lines 5-26, remove the local definitions and import the shared catalog; in tools/repo-cli/test/execution-orchestration.test.mjs at lines 18-38, remove the duplicate definitions and import the same shared exports.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/operations/foundation-reconciliation-2026-08-02.md`:
- Line 5: Update the Source commit entry in the reconciliation document to store
the full 40-character commit SHA, while retaining 86e72d8 only as the display
text.
- Line 68: Update the rollback documentation around FND-001 to state that
reverting foundation-reconciliation.test.mjs removes its repo:check enforcement
in addition to reconciliation evidence, and require running corepack pnpm
repo:check after the rollback.
In `@docs/plans/002-complete-execution-orchestration.md`:
- Line 98: Update the parallel-lane guidance in the execution orchestration plan
to match the dependency graph: do not permit CRF/PDA or MR/DQG to overlap unless
both control records explicitly define and enforce the required interface-level
entry gates. Otherwise remove those pairs from the parallel lanes, preserving
the serial foundation spine and other valid sequencing.
- Line 122: Define normalized-key explicitly in the plan as a deterministic
transformation from each module key, including handling separators, casing, and
any invalid characters, so Kotlin package directories and Python processor paths
are unambiguous. Alternatively, list the resolved normalized path for every
module key; ensure the documented rule or mappings are applied consistently
across feature clients and engine processors.
- Around line 41-48: Update the state-transition table in the execution
orchestration plan to include partial-needs-reconciliation, in-progress, and
post-ga-planned, including the valid next states and the promotion permitted by
the ledger rules around the existing transition guidance. Reconcile the table
with every state used by the ledger, and separate requirement, plan, and task
state transitions when their meanings differ.
In `@docs/plans/003-luna-handoff-runbook.md`:
- Line 146: Update the “CodeRabbit invocation count and review URL” handoff
field in the Luna handoff runbook to also record the invocation timestamp in
UTC, while preserving the existing count and review URL entries.
- Line 118: Update the “Redis is lost” recovery guidance to distinguish lock
loss from ordinary dispatch/cache loss: before rebuilding Redis state, reconcile
durable attempts and leases, fence stale workers, and verify idempotency/effect
receipts; only then rebuild dispatch from PostgreSQL outbox/jobs and redispatch
eligible work.
- Line 27: Update the worktree setup command in the runbook so it does not
always use the feat/ prefix; instruct users to select the branch prefix based on
task type, including fix/ and other conventional prefixes for operational or
documentation work, or provide separate commands for the supported task
categories.
In `@tools/repo-cli/src/check-execution-orchestration.mjs`:
- Around line 86-90: Update pathExists to reject "." and ".." path segments
before resolving the declared path, then resolve the candidate path and verify
it remains within repositoryRoot before calling existsSync. Preserve the
existing validation for non-string, blank, and glob-containing paths, and keep
valid repository-relative paths working.
---
Nitpick comments:
In `@docs/plans/003-luna-handoff-runbook.md`:
- Line 172: Update the bootstrap prompt in the runbook so PostgreSQL
migration/tenant tests and vertical client/adapter coverage are required only
when the task changes durable state or involves client behavior. Keep the
remaining evidence and delivery requirements applicable to all tasks, while
preserving the task-conditional entry-gate wording.
In `@tools/repo-cli/src/check-execution-orchestration.mjs`:
- Around line 5-26: Create a shared orchestration plan catalog module containing
the single definitions of expectedPlans and expectedPriorityTotals. In
tools/repo-cli/src/check-execution-orchestration.mjs at lines 5-26, remove the
local definitions and import the shared catalog; in
tools/repo-cli/test/execution-orchestration.test.mjs at lines 18-38, remove the
duplicate definitions and import the same shared exports.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 8cc266ad-874b-4781-a97d-ebe86b0eb521
📒 Files selected for processing (12)
docs/operations/foundation-reconciliation-2026-08-02.mddocs/plans/000-platform-program.mddocs/plans/002-complete-execution-orchestration.mddocs/plans/003-luna-handoff-runbook.mddocs/plans/README.mddocs/plans/execution-orchestration.jsonpackage.jsonservices/engine/scripts/run-engine.mjsservices/engine/test/launcher.test.mjstools/repo-cli/src/check-execution-orchestration.mjstools/repo-cli/test/execution-orchestration.test.mjstools/repo-cli/test/foundation-reconciliation.test.mjs
Merge the focused fixes for the single CodeRabbit review on promotion PR #11.
|
Promotion review update: PR #11 now includes the focused fixes merged through PR #12 ( |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/plans/002-complete-execution-orchestration.md`:
- Line 106: Make the parallel-lane policy machine-checkable by adding lane
assignments and control-record fields to execution-orchestration.json, then
update the checker and tests to enforce entry gates, migration reservations,
integration ownership, serial-lane constraints, and the 280-file limit. Add
negative tests covering each rejected condition; if any enforcement remains
manual, make the runbook pre-mutation gate authoritative and require its
decision in every task handoff.
In `@tools/repo-cli/test/execution-orchestration.test.mjs`:
- Around line 189-198: Strengthen the test named “CodeRabbit promotion
disposition records one review and rejected claims” to validate the complete
disposition contract: require the exact Promotion PR value for `#11`, assert the
explicit “No second review will be requested” declaration, and verify the
document declares exactly ten valid issues with the expected issue entries,
preventing extra review runs or partial issue lists from passing.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f4548102-6ed3-4421-a628-5891007ae05c
📒 Files selected for processing (7)
docs/operations/code-review-11-disposition.mddocs/operations/foundation-reconciliation-2026-08-02.mddocs/plans/002-complete-execution-orchestration.mddocs/plans/003-luna-handoff-runbook.mdtools/repo-cli/src/check-execution-orchestration.mjstools/repo-cli/test/execution-orchestration.test.mjstools/repo-cli/test/foundation-reconciliation.test.mjs
🚧 Files skipped from review as they are similar to previous changes (4)
- tools/repo-cli/test/foundation-reconciliation.test.mjs
- docs/operations/foundation-reconciliation-2026-08-02.md
- docs/plans/003-luna-handoff-runbook.md
- tools/repo-cli/src/check-execution-orchestration.mjs
| - One integration owner resolves contract/migration ordering before either branch merges. | ||
| - The combined `dev` to `main` promotion remains below 280 changed files, leaving margin under CodeRabbit's 300-file limit. | ||
|
|
||
| Safe parallel lanes after dogfood are FA→SA, QI, and OC. CRF/PDA and MR/DQG remain serial by default. EI may overlap with those later plans only when both control records declare the matching interface-level entry gates, contract/migration reservations, and integration owner; otherwise they remain serial too. The foundation spine 010→070 stays serial. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- candidate files ---'
git ls-files | rg '(^|/)(docs/plans/002-complete-execution-orchestration\.md|.*(check|checker|execution|ledger|control|plan|orchestrat).*)$' | head -200
printf '%s\n' '--- referenced terms ---'
rg -n -i 'parallel.?lane|entry gate|migration reservation|integration owner|changed.?file|dag|acycl|plan dependenc|task invent|evidence|dogfood|FA.?→.?SA|CRF/PDA|MR/DQG|EI' . --glob '!node_modules' --glob '!dist' --glob '!build' | head -300Repository: DatabreezeService/databreeze-platform
Length of output: 49773
🏁 Script executed:
#!/bin/bash
set -eu
for f in \
docs/plans/002-complete-execution-orchestration.md \
docs/plans/execution-orchestration.json \
tools/repo-cli/src/check-execution-orchestration.mjs \
tools/repo-cli/test/execution-orchestration.test.mjs \
docs/plans/003-luna-handoff-runbook.md \
docs/operations/code-review-11-disposition.md
do
printf '\n--- %s ---\n' "$f"
wc -l "$f"
ast-grep outline "$f" 2>/dev/null | head -120 || true
done
printf '\n--- orchestration plan ---\n'
cat -n docs/plans/002-complete-execution-orchestration.md
printf '\n--- orchestration ledger ---\n'
cat -n docs/plans/execution-orchestration.jsonRepository: DatabreezeService/databreeze-platform
Length of output: 50395
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- checker ---'
cat -n tools/repo-cli/src/check-execution-orchestration.mjs
printf '%s\n' '--- tests ---'
cat -n tools/repo-cli/test/execution-orchestration.test.mjs
printf '%s\n' '--- ledger ---'
cat -n docs/plans/execution-orchestration.json
printf '%s\n' '--- orchestration-related references ---'
rg -n -i 'parallel|lane|entryGate|entry.?gate|migration|integrationOwner|owner|changedFiles|file.?limit|control record|reservation' \
docs/plans/execution-orchestration.json \
tools/repo-cli/src/check-execution-orchestration.mjs \
tools/repo-cli/test/execution-orchestration.test.mjs \
docs/plans/002-complete-execution-orchestration.md \
docs/plans/003-luna-handoff-runbook.mdRepository: DatabreezeService/databreeze-platform
Length of output: 50393
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- relevant orchestration policy ---'
sed -n '94,108p' docs/plans/002-complete-execution-orchestration.md
printf '%s\n' '--- runbook enforcement steps ---'
sed -n '35,75p' docs/plans/003-luna-handoff-runbook.md
sed -n '145,162p' docs/plans/003-luna-handoff-runbook.md
printf '%s\n' '--- later plan gates ---'
sed -n '610,660p' docs/plans/002-complete-execution-orchestration.md
sed -n '676,760p' docs/plans/002-complete-execution-orchestration.md
printf '%s\n' '--- read-only structural verifier ---'
python3 - <<'PY'
import json
from pathlib import Path
root = Path('.')
ledger = json.loads((root / 'docs/plans/execution-orchestration.json').read_text())
checker = (root / 'tools/repo-cli/src/check-execution-orchestration.mjs').read_text()
tests = (root / 'tools/repo-cli/test/execution-orchestration.test.mjs').read_text()
plan = (root / 'docs/plans/002-complete-execution-orchestration.md').read_text()
terms = [
'parallel', 'lane', 'entryGate', 'entry gate', 'migrationReservation',
'migration reservation', 'integrationOwner', 'integration owner',
'changedFiles', 'changed-file', 'primary feature directory',
]
print('ledger top-level keys:', sorted(ledger))
print('plan keys:', sorted(ledger['plans'][0]))
for term in terms:
print(f'{term!r}: ledger={term in json.dumps(ledger)}, checker={term in checker}, tests={term in tests}')
print('policy sentence present:', 'Safe parallel lanes after dogfood' in plan)
print('runbook manual delegation control present:', 'explicit integration ownership' in
(root / 'docs/plans/003-luna-handoff-runbook.md').read_text())
PYRepository: DatabreezeService/databreeze-platform
Length of output: 18057
Make the parallel-lane policy machine-checkable.
execution-orchestration.json has no lane or control-record fields. The checker and tests do not enforce entry gates, migration reservations, integration ownership, serial lanes, or the 280-file limit. Add these controls and negative tests. If enforcement remains manual, make the runbook pre-mutation gate authoritative and record its decision in each task handoff.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/plans/002-complete-execution-orchestration.md` at line 106, Make the
parallel-lane policy machine-checkable by adding lane assignments and
control-record fields to execution-orchestration.json, then update the checker
and tests to enforce entry gates, migration reservations, integration ownership,
serial-lane constraints, and the 280-file limit. Add negative tests covering
each rejected condition; if any enforcement remains manual, make the runbook
pre-mutation gate authoritative and require its decision in every task handoff.
| test('CodeRabbit promotion disposition records one review and rejected claims', () => { | ||
| const disposition = readFileSync( | ||
| path.join(repositoryRoot, 'docs', 'operations', 'code-review-11-disposition.md'), | ||
| 'utf8', | ||
| ); | ||
| assert.match(disposition, /Promotion PR.*#11/u); | ||
| assert.match(disposition, /one permitted full CodeRabbit review/u); | ||
| assert.match(disposition, /Duplicate plan catalog/u); | ||
| assert.match(disposition, /Docstring coverage warning/u); | ||
| }); |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Enforce the complete promotion-disposition contract.
These substring assertions can pass when the document records multiple review runs, omits No second review will be requested, or lists fewer than ten valid issues. The PR assertion also accepts values such as #110. Assert exact fields and the declared issue count.
🧪 Proposed test strengthening
- assert.match(disposition, /Promotion PR.*`#11/u`);
+ assert.match(disposition, /^\*\*Promotion PR:\*\* \[`#11`\]\([^)\n]+\)$/mu);
assert.match(disposition, /one permitted full CodeRabbit review/u);
- assert.match(disposition, /Duplicate plan catalog/u);
- assert.match(disposition, /Docstring coverage warning/u);
+ assert.match(disposition, /No second review will be requested/u);
+ assert.equal((disposition.match(/^\*\*Review run:\*\*/gmu) ?? []).length, 1);
+ assert.equal((disposition.match(/^\d+\. /gmu) ?? []).length, 10);
+ assert.match(disposition, /^### Duplicate plan catalog$/mu);
+ assert.match(disposition, /^### Docstring coverage warning$/mu);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| test('CodeRabbit promotion disposition records one review and rejected claims', () => { | |
| const disposition = readFileSync( | |
| path.join(repositoryRoot, 'docs', 'operations', 'code-review-11-disposition.md'), | |
| 'utf8', | |
| ); | |
| assert.match(disposition, /Promotion PR.*#11/u); | |
| assert.match(disposition, /one permitted full CodeRabbit review/u); | |
| assert.match(disposition, /Duplicate plan catalog/u); | |
| assert.match(disposition, /Docstring coverage warning/u); | |
| }); | |
| test('CodeRabbit promotion disposition records one review and rejected claims', () => { | |
| const disposition = readFileSync( | |
| path.join(repositoryRoot, 'docs', 'operations', 'code-review-11-disposition.md'), | |
| 'utf8', | |
| ); | |
| assert.match(disposition, /^\*\*Promotion PR:\*\* \[`#11`\]\([^)\n]+\)$/mu); | |
| assert.match(disposition, /one permitted full CodeRabbit review/u); | |
| assert.match(disposition, /No second review will be requested/u); | |
| assert.equal((disposition.match(/^\*\*Review run:\*\*/gmu) ?? []).length, 1); | |
| assert.equal((disposition.match(/^\d+\. /gmu) ?? []).length, 10); | |
| assert.match(disposition, /^### Duplicate plan catalog$/mu); | |
| assert.match(disposition, /^### Docstring coverage warning$/mu); | |
| }); |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tools/repo-cli/test/execution-orchestration.test.mjs` around lines 189 - 198,
Strengthen the test named “CodeRabbit promotion disposition records one review
and rejected claims” to validate the complete disposition contract: require the
exact Promotion PR value for `#11`, assert the explicit “No second review will be
requested” declaration, and verify the document declares exactly ten valid
issues with the expected issue entries, preventing extra review runs or partial
issue lists from passing.
Summary
FND-002while keeping product requirements unverified until their full gates pass.Validation before promotion
corepack pnpm repo:check— pass (43 repository CLI tests; all 21 workspace test tasks).corepack pnpm repo:build— pass (12/12 build tasks).uv run --locked --offline python -m pytest— 89 passed.corepack pnpm infra:check— pass; no resources applied.Required review
Please perform one full CodeRabbit review on this promotion PR. This is the only CodeRabbit review permitted for this PR. Afterward, every comment will be reproduced and either fixed with a focused commit or documented as invalid; no second review will be requested.
Summary by CodeRabbit
Documentation
New Features
Tests