Skip to content

Campaign wave 6: the audit tier reaches v2, and a refuted bead proves already-satisfied - #5484

Merged
Sinity merged 8 commits into
masterfrom
work/campaign-wave6
Sep 23, 2026
Merged

Sinity merged 8 commits into
masterfrom
work/campaign-wave6

Conversation

@Sinity

@Sinity Sinity commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Summary

7 workers on the campaign's genuine frontier — the beads with real remaining work and nothing blocking them. Eight commits, zero merge conflicts, sixth consecutive wave. 256 focused tests pass.

commit bead
feat(storage): advance audit tier to v2 a7xr.27.3.2 AUD-M1..M3
perf(bench): attribute mixed-load daemon latency phases tingl AC1–AC4
test(daemon): prove HTTP query route operation parity tar1n.1 HTTP-3
feat(devtools): attribute collection cost per collected item 016xl AC1–AC4
test(scenarios): measure warm pilot artifact reuse 1xc.14.1 — 10/12, 2 AC-REWRITE
test(query): guard canonical search lowering vbsc0.1 AC3
test(daemon,query): update the paste-browser double… two red tests
test(bench): type the mixed-load phase instrumentation integration fix

The durable migration

a7xr.27.3.2 advances the audit tier to v2 — the first durable migration this campaign has landed, on the one tier that had no numbered-migration route at all. Checked rather than trusted:

  • slot 2 on audit, no collision (source/004 was the last durable slot taken)
  • requires_backup: true with a real backup_plan_ref — the guard that rejected an earlier wave's dead-on-arrival sidecar
  • sql_sha256 recomputed from the file: 9ef73b33… matches the sidecar exactly
  • test_durable_change_train.py 100 passed, test_durable_tier_version_authority.py 11 passed

8r4zq: the fix was the specification

The lane found all six rewritten criteria already satisfied at head. No production change was needed or made.

That bead spent this campaign titled "Mutating HTTP routes wait on the writer future with no timeout", inviting a caller timeout that abandons admitted writes. Once retitled to what was actually wanted — "Bound client-facing mutation waits without abandoning admitted writes" — the answer was that the code already does it. The defect was never in the daemon; it was in the bead.

Two workers declined to change production, correctly

  • tingl: attributed mixed-load latency by phase and made no production fix, because the criteria require attribution before a change and a reduction without attribution is not evidence. The benchmark now emits the dominant phase and keeps unexplained time as an instrumentation tail rather than hiding it.
  • tar1n.1 HTTP-3: proved route/operation parity with no production route change needed.

Two more red tests fixed

test_http_bounded_mutations's _Poly double still exposed filter()/get_session() — the full-archive walk q54dt moved the route off — so it raised AttributeError instead of testing anything. It now models the bounded query_units route and additionally asserts the handler makes exactly one read at the requested limit/offset, which the walking double could not check.

Verification

devtools verify --quick              ->  PASSED exit=0
devtools test <7 touched test files> ->  256 passed, exit 0

🤖 Generated with Claude Code

https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy

Sinity and others added 8 commits September 23, 2026 14:02
(cherry picked from commit 1f1138dfe9f57f60d702c7f842238a488db855ad)
(cherry picked from commit 2c52135a101bb29b1434d9d2956d4d3ac29728f8)
(cherry picked from commit dbd58dbe5d4272197e83bb5f6bd2d555b3eb5567)
(cherry picked from commit 93fdb0fb71990af72b4b7ef27d98722835e079ca)
…omparison

Two test-side fixes that were both red before this change.

test_http_bounded_mutations' _Poly double still exposed filter()/get_session()
-- the full-archive walk polylogue-q54dt moved this route off. The handler now
calls poly.query_units(), so the double raised AttributeError rather than
testing anything. It now models the bounded route and additionally asserts the
handler makes exactly ONE read at the requested limit/offset, which the walking
double could not check. The invariant the test was written for is unchanged:
next_offset marks the page as truncated, so total stays None.

test_session_read_lowering's new assertion compared a declared SessionPage
return against a stub sentinel string; same narrowing already applied to its
sibling in #5483.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
(cherry picked from commit 2b189cd4603d39c3d23a7b8e7377e9730209e140)
(cherry picked from commit bded3f6601bacbdee769c71a6ce5c23252a77c87)
The phase-attribution wrapper forwarded **kwargs: object into
open_operation_read, whose keywords are typed (Path, EmbeddingRecipe,
QueryExecutionContext), and phase_read declared dict[str, object] while its
caller supplies the dict[str, int] that mixed_load_read_params returns.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 8de1f21e-48ce-44a6-a805-97ee8339958a

📥 Commits

Reviewing files that changed from the base of the PR and between d5f2b2a and 4390387.

📒 Files selected for processing (15)
  • devtools/collection_cost.py
  • docs/plans/slo-catalog.yaml
  • polylogue/storage/sqlite/archive_tiers/__init__.py
  • polylogue/storage/sqlite/archive_tiers/audit.py
  • polylogue/storage/sqlite/migrations/audit/002.train.json
  • polylogue/storage/sqlite/migrations/audit/002_machine_request_operation_index.sql
  • polylogue/storage/sqlite/migrations/audit/__init__.py
  • tests/benchmarks/cli_profile.py
  • tests/benchmarks/test_daemon_operation_profile.py
  • tests/unit/archive/query/test_session_read_lowering.py
  • tests/unit/daemon/test_http_bounded_mutations.py
  • tests/unit/daemon/test_route_contracts.py
  • tests/unit/devtools/test_collection_cost.py
  • tests/unit/scenarios/test_resource_pilot.py
  • tests/unit/storage/test_durable_tier_version_authority.py

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-23T12:24:59.324354Z 4390387 PR opened
🔒 Security Review ✅ Completed 2026-09-23T12:23:11.729303Z 4390387 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 4390387328

ℹ️ 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".

Comment thread devtools/collection_cost.py Resolved
@Sinity
Sinity merged commit 7dcb24e into master Sep 23, 2026
3 checks passed
@Sinity
Sinity deleted the work/campaign-wave6 branch September 23, 2026 12:26
Sinity added a commit that referenced this pull request Sep 23, 2026
…5486)

## What this fixes

A full-corpus `verify --all` at master `2df6e2fa9` returned **259
failures**, dominated by one cause.

`polylogue-3eexy` retired the CLI's direct-read execution mode: the
daemon is the required executor and the CLI is a thin client, so a CLI
command with no daemon returns a typed daemon-required refusal and exits
1. Every test invoking a CLI surface in-process failed with `cli surface
failed (1) for '<expression>'`.

Four instances were fixed piecemeal earlier today (#5474, #5476, #5481,
#5484). They were samples, not the population.

## The fix was already in the repo

`tests/infra/daemon_operations.py:194` — **`cli_daemon_archive`** runs a
real `DaemonOperationRuntime` behind a real UDS listener and points the
CLI at it. Its docstring states the rule: *"A CLI test that wants to
observe what a mutation actually does therefore has to supply the daemon
the command requires."* **Nine test files already used it**; every
failing file used it zero times.

So this is a mechanical migration onto an established pattern, not a
redesign. Each test got one of two treatments:

- **FIXTURE** — the test observes CLI behaviour → take
`cli_daemon_archive`
- **REFUSAL-ASSERT** — the test pins daemon-*absent* behaviour → assert
non-zero exit, a message naming the operation, and non-empty output (the
shape #5481 established for `facets`)

No assertion was weakened and no test deleted to reduce the count.

## Result

| lane | files | before | after |
|---|---|---|---|
| m1 | documented query corpus, query route differential | 36 | 0 |
| m2 | messages, plain CLI snapshots | 30 | 0 |
| m3 | status ×2, json envelope contract | 25 | 3 |
| m4 | reference/query-law differentials, basic usage CLI | 26 | 4 |
| m5 | query mutation authority, expression, contextual errors,
pagination | 22 | 0 |
| m6 | plain output contract, interactive, output schemas, operation
authority | 16 | 0 |
| m7 | product query workflows (+ source cache reuse) | 13 | 8 |
| **total** | | **168** | **15** |

**All 15 remaining failures are pre-existing**, each verified by exact
test name in the pre-migration corpus log: 3 `TestArchiveTableCounts`
archive-count assertions, 4 query-law census plan-classification cases,
8 `test_source_cache_reuse` cache-semantics failures unrelated to the
CLI.

## Verification

```
devtools verify --quick                  ->  PASSED exit=0
devtools test <18 migrated files>        ->  3 failed (all pre-existing), rest green
```

## Coordinator notes

Three of seven lanes (`m1`, `m2`, `m5`) completed correct work and left
it **uncommitted** in their worktrees; committed here after `ruff`
import-order and format fixes. A secret-scan candidate in
`test_complete_selection_pagination.py` was reviewed and is a false
positive — it matches the parameter name `row_key` and a query-token
constant, not a credential.

`polylogue-3eexy` was closed earlier today on a lane's report that its
AC5 ("no tests exercise the retired direct path") held over the three
files that lane owned. The corpus showed hundreds still did. That
premature close is recorded on the bead, with `n57xe` as its successor.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Behavior Changes**
* CLI operations that require archive access now report a typed status
refusal when the daemon is unavailable, rather than presenting a
successful direct-archive fallback.
* Status-related errors are checked for clear messages and nonzero exit
results.
* **Testing**
* Expanded coverage of CLI, query, transcript, usage, and MCP workflows
using daemon-backed archives, including multi-page selections and
cross-origin search.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sinity added a commit that referenced this pull request Sep 23, 2026
…back (#5488)

## Summary

Four wide-scope lanes — the first wave designed against the structural
limit waves 9–10 exposed, rather than into it. **Three commits landed;
one is deliberately held back.**

| commit | bead |
|---|---|
| `refactor(continuity): reduce cold lane bloat` | `z9gh.7.2` AC1–AC7 |
| `docs(ops): inventory historical tier tables` | `pnxl6` AC1–AC5 |
| `test(cli): align read routes with daemon execution` | `4p1` AC1,
`vbsc0.1` AC3 |

## Held back: a durable-schema defect

`L4`'s commit (`943e74b49`, sink delivery position) is **not in this
PR**. It adds a new table `session_marker_delivery` to the **user tier**
through `CREATE TABLE IF NOT EXISTS` in the fresh DDL, touching **no
migration file**.

The user tier is durable and irreplaceable — it holds assertions,
settings and annotation provenance. `USER_TIER_VERSION = 2`, with
exactly one numbered migration (`002_assertions_status_not_null.sql`). A
fresh-DDL-only addition gives *new* archives the table and silently
leaves every *existing* `user.db` without it. That is the "never strand
existing durable archives with a schema shortcut" rule, and the
operator's live archive is one of those.

It needs `migrations/user/003` with a correct `.train.json` sidecar
(`sql_sha256` over the file, and a real `backup_plan_ref` if
`requires_backup`) before any of it lands. Recorded on
`polylogue-bp12n.1`.

## Two diagnoses of mine, corrected by the evidence

**Wide scope was not the missing ingredient for `bp12n.1`.** I
attributed its untouched criteria to narrow lane scoping and widened the
scope specifically to fix that. With the wide scope, AC3–AC8 are *still*
unattempted — the accepted-input batch stream, input fences and
publication façade are genuinely large implementation work. The bead
needs sustained implementation, not a wider lane.

**`pnxl6` AC6 got a second independent refusal** (wave 10 `s4`, now wave
12 `L3`), both citing unresolved replacement-reader and audit-shape
decisions. Rather than dispatch a third lane, I checked what changed:
**the audit tier reached v2 today** (`a7xr.27.3.2`, #5484) and now has a
numbered-migration route it never had, and `audit.py:12` already
declares `machine_requests`. So half of AC6 — "the MCP call log joins
audit `machine_requests`" — now has both a sink and a route. Split
recorded: (a) move the call log over the v2 route, now dispatchable; (b)
retire telemetry samples once their readers are named.

## Partial, stated as partial

`z9gh.7.2` reduced the cold lane by **125 LOC against a +1126 overrun**,
and added artifact provenance checks. AC8 still wants model-generated
provenance where the artifact is author-recorded. Progress, not the
target.

## Verification

```
devtools verify --quick   ->  PASSED exit=0
devtools test <6 files>   ->  157 passed, exit 0
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
@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 bf68918):

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