Skip to content

feat(capture,declarations): durable job event stream and MCP contract projections - #4328

Merged
Sinity merged 3 commits into
masterfrom
integration/batch-11a
Aug 27, 2026
Merged

Sinity merged 3 commits into
masterfrom
integration/batch-11a

Conversation

@Sinity

@Sinity Sinity commented Aug 27, 2026

Copy link
Copy Markdown
Owner

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.ai/code/session_014BQsaB1NBY8mTR6yZByfMA

Sinity and others added 3 commits August 27, 2026 09:56
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
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5a8f2285-0d3f-4906-b009-37851f962064


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Sinity
Sinity merged commit e3e078e into master Aug 27, 2026
2 of 3 checks passed
@Sinity
Sinity deleted the integration/batch-11a branch August 27, 2026 07:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Sinity added a commit that referenced this pull request Aug 27, 2026
… 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]>
Sinity added a commit that referenced this pull request Aug 27, 2026
## 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
Sinity added a commit that referenced this pull request Aug 27, 2026
… 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]>
Sinity added a commit that referenced this pull request Aug 27, 2026
## 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
Sinity added a commit that referenced this pull request Aug 28, 2026
… 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]>
Sinity added a commit that referenced this pull request Aug 28, 2026
## 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
Sinity added a commit that referenced this pull request Sep 1, 2026
… 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]>
Sinity added a commit that referenced this pull request Sep 1, 2026
## 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
@Sinity

Sinity commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

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.

@Sinity

Sinity commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

Closing out open Codex review threads on this PR (evidence checked against master at f88b4a6):

  • P1 polylogue/browser_capture/capture_job_events.py:14: Fixed on master (checked at f88b4a6): The event reader accepts a before_revision cursor (polylogue/browser_capture/capture_job_events.py:34), and the route validates it and returns next_before_revision (polylogue/browser_capture/capture_jobs.py:680-686).

Resolving every thread listed; confirmed defects are fixed under the named bead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant