Repository navigation
feat(capture,declarations): durable job event stream and MCP contract projections - #4328
Conversation
Two batch integrations each noticed the document was unindexed and added a catalog row for it, under different titles. `render docs-surface` refuses duplicate entries, so `devtools verify --quick` is red on clean master and every batch gating against it inherits the failure. Keeps the entry adjacent to the other operations rows and regenerates the docs map. Verification: `devtools render docs-surface --check` → `sync OK`; the same command fails on master with `duplicate documentation entries`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8fdb6442a3
ℹ️ 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".
… projections (#4328) ## Summary Integration batch: two lanes with disjoint file sets, merged onto one branch and verified together, plus a repair to a master defect that blocked the gate. | lane | change | | --- | --- | | polylogue-o21 | derive MCP contract projections from the declaration registry | | polylogue-06zm | add a durable capture-job event stream with a bounded read projection | ## Problem These lanes finished but never published. Per-lane PRs are also the wrong unit — the landing discipline is one PR per coherent batch. The batch could not gate at all until an unrelated master defect was repaired: two earlier integration batches each added a catalog row for `docs/artifact-publication.md` under different titles, so the generated docs surface refuses with `duplicate documentation entries` and `devtools verify --quick` was red on master for everyone. That commit is authored by the agent that found it; this batch carries it because it cannot be green without it. ## Solution `o21` moves the `*_inputs(registry)` derivation helpers onto a `DeclarationRegistryProtocol` so MCP contract projections derive from the registry rather than a concrete type. `06zm` adds `capture_job_events` as a receiver-ordered table with `read_capture_job_events` as its bounded read projection, consumed by `capture_jobs.py`. ## Verification `devtools verify --quick` → exit 0 (red on master before the docs repair: `render docs-surface: duplicate documentation entries`). `devtools test tests/unit/browser_capture/test_capture_jobs.py tests/unit/declarations/test_registry.py tests/unit/mcp/test_envelope_contracts.py tests/unit/mcp/test_tool_discovery.py` → `50 passed, 3 warnings in 19.74s`. Red-flag scan: 2 flags, both read and both benign. `production lines removed` is the `*_inputs` helpers moving to `polylogue/declarations/derive.py` with a Protocol signature, not deletions. `new production module without a test` names `capture_job_events.py`, a 32-line read projection imported by `capture_jobs.py` and exercised through it — the documented stem-matching miss in that flag. ## Residual risk `polylogue-303r.2.2` was dropped: it conflicts on `polylogue/sinex/service.py` and `tests/unit/sinex/test_service.py` and needs its own rebase. Two lanes the batch derivation offered, `polylogue-kjj8t` and `polylogue-fnm.10`, were excluded as already integrated — both landed in #4324, and merging them would revert repairs made during that integration. Three more (`5jb8j`, `4ts.5`, `biz4y`) were excluded as already recorded defective. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Summary Recovers `polylogue-vusyh` from a batch where it had been reported as a merge conflict. | lane | change | | --- | --- | | polylogue-vusyh | executable reference archive model in `tests/infra/reference_model.py` with its test | ## Problem Seven lanes in my three assigned batches were reported as conflicting and therefore skipped. On inspection their only conflicting paths were `.lane/title`, `.lane/body.md` and `.lane/close-reason.md` — the gitignored publication scratch that was briefly committed to master, producing add/add conflicts against every lane that also wrote it. Those are not real disagreements. Resolving them by removing the scratch recovers the lane. ## Solution The batch resolves `.lane` conflicts by deletion and merges the lane normally. `polylogue-o21` merged cleanly the same way but contributed no content — its work is already on master via #4328 — so this branch carries `vusyh` alone. ## Verification `devtools verify --quick` → exit 0. `devtools test tests/unit/core/test_reference_model.py` → `2 passed`, reproduced identically on three consecutive runs. ## Residual risk Five lanes recovered the same way were dropped for defects that reproduce on their own branches, recorded on their beads: `wf3q7` (layering violation), `pfdf` and `vhsno` (own-branch test failures), `3d196` (incomplete recovered work-in-progress), `1xc.14` (test imports a module nothing provides). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA
… projections (#4328) ## Summary Integration batch: two lanes with disjoint file sets, merged onto one branch and verified together, plus a repair to a master defect that blocked the gate. | lane | change | | --- | --- | | polylogue-o21 | derive MCP contract projections from the declaration registry | | polylogue-06zm | add a durable capture-job event stream with a bounded read projection | ## Problem These lanes finished but never published. Per-lane PRs are also the wrong unit — the landing discipline is one PR per coherent batch. The batch could not gate at all until an unrelated master defect was repaired: two earlier integration batches each added a catalog row for `docs/artifact-publication.md` under different titles, so the generated docs surface refuses with `duplicate documentation entries` and `devtools verify --quick` was red on master for everyone. That commit is authored by the agent that found it; this batch carries it because it cannot be green without it. ## Solution `o21` moves the `*_inputs(registry)` derivation helpers onto a `DeclarationRegistryProtocol` so MCP contract projections derive from the registry rather than a concrete type. `06zm` adds `capture_job_events` as a receiver-ordered table with `read_capture_job_events` as its bounded read projection, consumed by `capture_jobs.py`. ## Verification `devtools verify --quick` → exit 0 (red on master before the docs repair: `render docs-surface: duplicate documentation entries`). `devtools test tests/unit/browser_capture/test_capture_jobs.py tests/unit/declarations/test_registry.py tests/unit/mcp/test_envelope_contracts.py tests/unit/mcp/test_tool_discovery.py` → `50 passed, 3 warnings in 19.74s`. Red-flag scan: 2 flags, both read and both benign. `production lines removed` is the `*_inputs` helpers moving to `polylogue/declarations/derive.py` with a Protocol signature, not deletions. `new production module without a test` names `capture_job_events.py`, a 32-line read projection imported by `capture_jobs.py` and exercised through it — the documented stem-matching miss in that flag. ## Residual risk `polylogue-303r.2.2` was dropped: it conflicts on `polylogue/sinex/service.py` and `tests/unit/sinex/test_service.py` and needs its own rebase. Two lanes the batch derivation offered, `polylogue-kjj8t` and `polylogue-fnm.10`, were excluded as already integrated — both landed in #4324, and merging them would revert repairs made during that integration. Three more (`5jb8j`, `4ts.5`, `biz4y`) were excluded as already recorded defective. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Summary Recovers `polylogue-vusyh` from a batch where it had been reported as a merge conflict. | lane | change | | --- | --- | | polylogue-vusyh | executable reference archive model in `tests/infra/reference_model.py` with its test | ## Problem Seven lanes in my three assigned batches were reported as conflicting and therefore skipped. On inspection their only conflicting paths were `.lane/title`, `.lane/body.md` and `.lane/close-reason.md` — the gitignored publication scratch that was briefly committed to master, producing add/add conflicts against every lane that also wrote it. Those are not real disagreements. Resolving them by removing the scratch recovers the lane. ## Solution The batch resolves `.lane` conflicts by deletion and merges the lane normally. `polylogue-o21` merged cleanly the same way but contributed no content — its work is already on master via #4328 — so this branch carries `vusyh` alone. ## Verification `devtools verify --quick` → exit 0. `devtools test tests/unit/core/test_reference_model.py` → `2 passed`, reproduced identically on three consecutive runs. ## Residual risk Five lanes recovered the same way were dropped for defects that reproduce on their own branches, recorded on their beads: `wf3q7` (layering violation), `pfdf` and `vhsno` (own-branch test failures), `3d196` (incomplete recovered work-in-progress), `1xc.14` (test imports a module nothing provides). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA
… projections (#4328) ## Summary Integration batch: two lanes with disjoint file sets, merged onto one branch and verified together, plus a repair to a master defect that blocked the gate. | lane | change | | --- | --- | | polylogue-o21 | derive MCP contract projections from the declaration registry | | polylogue-06zm | add a durable capture-job event stream with a bounded read projection | ## Problem These lanes finished but never published. Per-lane PRs are also the wrong unit — the landing discipline is one PR per coherent batch. The batch could not gate at all until an unrelated master defect was repaired: two earlier integration batches each added a catalog row for `docs/artifact-publication.md` under different titles, so the generated docs surface refuses with `duplicate documentation entries` and `devtools verify --quick` was red on master for everyone. That commit is authored by the agent that found it; this batch carries it because it cannot be green without it. ## Solution `o21` moves the `*_inputs(registry)` derivation helpers onto a `DeclarationRegistryProtocol` so MCP contract projections derive from the registry rather than a concrete type. `06zm` adds `capture_job_events` as a receiver-ordered table with `read_capture_job_events` as its bounded read projection, consumed by `capture_jobs.py`. ## Verification `devtools verify --quick` → exit 0 (red on master before the docs repair: `render docs-surface: duplicate documentation entries`). `devtools test tests/unit/browser_capture/test_capture_jobs.py tests/unit/declarations/test_registry.py tests/unit/mcp/test_envelope_contracts.py tests/unit/mcp/test_tool_discovery.py` → `50 passed, 3 warnings in 19.74s`. Red-flag scan: 2 flags, both read and both benign. `production lines removed` is the `*_inputs` helpers moving to `polylogue/declarations/derive.py` with a Protocol signature, not deletions. `new production module without a test` names `capture_job_events.py`, a 32-line read projection imported by `capture_jobs.py` and exercised through it — the documented stem-matching miss in that flag. ## Residual risk `polylogue-303r.2.2` was dropped: it conflicts on `polylogue/sinex/service.py` and `tests/unit/sinex/test_service.py` and needs its own rebase. Two lanes the batch derivation offered, `polylogue-kjj8t` and `polylogue-fnm.10`, were excluded as already integrated — both landed in #4324, and merging them would revert repairs made during that integration. Three more (`5jb8j`, `4ts.5`, `biz4y`) were excluded as already recorded defective. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Summary Recovers `polylogue-vusyh` from a batch where it had been reported as a merge conflict. | lane | change | | --- | --- | | polylogue-vusyh | executable reference archive model in `tests/infra/reference_model.py` with its test | ## Problem Seven lanes in my three assigned batches were reported as conflicting and therefore skipped. On inspection their only conflicting paths were `.lane/title`, `.lane/body.md` and `.lane/close-reason.md` — the gitignored publication scratch that was briefly committed to master, producing add/add conflicts against every lane that also wrote it. Those are not real disagreements. Resolving them by removing the scratch recovers the lane. ## Solution The batch resolves `.lane` conflicts by deletion and merges the lane normally. `polylogue-o21` merged cleanly the same way but contributed no content — its work is already on master via #4328 — so this branch carries `vusyh` alone. ## Verification `devtools verify --quick` → exit 0. `devtools test tests/unit/core/test_reference_model.py` → `2 passed`, reproduced identically on three consecutive runs. ## Residual risk Five lanes recovered the same way were dropped for defects that reproduce on their own branches, recorded on their beads: `wf3q7` (layering violation), `pfdf` and `vhsno` (own-branch test failures), `3d196` (incomplete recovered work-in-progress), `1xc.14` (test imports a module nothing provides). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA
… projections (#4328) ## Summary Integration batch: two lanes with disjoint file sets, merged onto one branch and verified together, plus a repair to a master defect that blocked the gate. | lane | change | | --- | --- | | polylogue-o21 | derive MCP contract projections from the declaration registry | | polylogue-06zm | add a durable capture-job event stream with a bounded read projection | ## Problem These lanes finished but never published. Per-lane PRs are also the wrong unit — the landing discipline is one PR per coherent batch. The batch could not gate at all until an unrelated master defect was repaired: two earlier integration batches each added a catalog row for `docs/artifact-publication.md` under different titles, so the generated docs surface refuses with `duplicate documentation entries` and `devtools verify --quick` was red on master for everyone. That commit is authored by the agent that found it; this batch carries it because it cannot be green without it. ## Solution `o21` moves the `*_inputs(registry)` derivation helpers onto a `DeclarationRegistryProtocol` so MCP contract projections derive from the registry rather than a concrete type. `06zm` adds `capture_job_events` as a receiver-ordered table with `read_capture_job_events` as its bounded read projection, consumed by `capture_jobs.py`. ## Verification `devtools verify --quick` → exit 0 (red on master before the docs repair: `render docs-surface: duplicate documentation entries`). `devtools test tests/unit/browser_capture/test_capture_jobs.py tests/unit/declarations/test_registry.py tests/unit/mcp/test_envelope_contracts.py tests/unit/mcp/test_tool_discovery.py` → `50 passed, 3 warnings in 19.74s`. Red-flag scan: 2 flags, both read and both benign. `production lines removed` is the `*_inputs` helpers moving to `polylogue/declarations/derive.py` with a Protocol signature, not deletions. `new production module without a test` names `capture_job_events.py`, a 32-line read projection imported by `capture_jobs.py` and exercised through it — the documented stem-matching miss in that flag. ## Residual risk `polylogue-303r.2.2` was dropped: it conflicts on `polylogue/sinex/service.py` and `tests/unit/sinex/test_service.py` and needs its own rebase. Two lanes the batch derivation offered, `polylogue-kjj8t` and `polylogue-fnm.10`, were excluded as already integrated — both landed in #4324, and merging them would revert repairs made during that integration. Three more (`5jb8j`, `4ts.5`, `biz4y`) were excluded as already recorded defective. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## Summary Recovers `polylogue-vusyh` from a batch where it had been reported as a merge conflict. | lane | change | | --- | --- | | polylogue-vusyh | executable reference archive model in `tests/infra/reference_model.py` with its test | ## Problem Seven lanes in my three assigned batches were reported as conflicting and therefore skipped. On inspection their only conflicting paths were `.lane/title`, `.lane/body.md` and `.lane/close-reason.md` — the gitignored publication scratch that was briefly committed to master, producing add/add conflicts against every lane that also wrote it. Those are not real disagreements. Resolving them by removing the scratch recovers the lane. ## Solution The batch resolves `.lane` conflicts by deletion and merges the lane normally. `polylogue-o21` merged cleanly the same way but contributed no content — its work is already on master via #4328 — so this branch carries `vusyh` alone. ## Verification `devtools verify --quick` → exit 0. `devtools test tests/unit/core/test_reference_model.py` → `2 passed`, reproduced identically on three consecutive runs. ## Residual risk Five lanes recovered the same way were dropped for defects that reproduce on their own branches, recorded on their beads: `wf3q7` (layering violation), `pfdf` and `vhsno` (own-branch test failures), `3d196` (incomplete recovered work-in-progress), `1xc.14` (test imports a module nothing provides). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA
|
Closing out open Codex review threads on this PR (evidence checked against master at ef10e59):
Resolving the fixed, stale and refuted threads; tracked threads stay open. |
|
Closing out open Codex review threads on this PR (evidence checked against master at f88b4a6):
Resolving every thread listed; confirmed defects are fixed under the named bead. |
Summary
Integration batch: two lanes with disjoint file sets, merged onto one branch and verified together, plus a repair to a master defect that blocked the gate.
Problem
These lanes finished but never published. Per-lane PRs are also the wrong unit — the landing discipline is one PR per coherent batch.
The batch could not gate at all until an unrelated master defect was repaired: two earlier integration batches each added a catalog row for
docs/artifact-publication.mdunder different titles, so the generated docs surface refuses withduplicate documentation entriesanddevtools verify --quickwas red on master for everyone. That commit is authored by the agent that found it; this batch carries it because it cannot be green without it.Solution
o21moves the*_inputs(registry)derivation helpers onto aDeclarationRegistryProtocolso MCP contract projections derive from the registry rather than a concrete type.06zmaddscapture_job_eventsas a receiver-ordered table withread_capture_job_eventsas its bounded read projection, consumed bycapture_jobs.py.Verification
devtools verify --quick→ exit 0 (red on master before the docs repair:render docs-surface: duplicate documentation entries).devtools test tests/unit/browser_capture/test_capture_jobs.py tests/unit/declarations/test_registry.py tests/unit/mcp/test_envelope_contracts.py tests/unit/mcp/test_tool_discovery.py→50 passed, 3 warnings in 19.74s.Red-flag scan: 2 flags, both read and both benign.
production lines removedis the*_inputshelpers moving topolylogue/declarations/derive.pywith a Protocol signature, not deletions.new production module without a testnamescapture_job_events.py, a 32-line read projection imported bycapture_jobs.pyand exercised through it — the documented stem-matching miss in that flag.Residual risk
polylogue-303r.2.2was dropped: it conflicts onpolylogue/sinex/service.pyandtests/unit/sinex/test_service.pyand needs its own rebase.Two lanes the batch derivation offered,
polylogue-kjj8tandpolylogue-fnm.10, were excluded as already integrated — both landed in #4324, and merging them would revert repairs made during that integration. Three more (5jb8j,4ts.5,biz4y) were excluded as already recorded defective.🤖 Generated with Claude Code
https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA