Skip to content

Campaign wave 12: wide-scope lanes, and a durable-schema defect held back - #5488

Merged
Sinity merged 3 commits into
masterfrom
work/campaign-wave12
Sep 23, 2026
Merged

Sinity merged 3 commits into
masterfrom
work/campaign-wave12

Conversation

@Sinity

@Sinity Sinity commented Sep 23, 2026

Copy link
Copy Markdown
Owner

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

(cherry picked from commit dd634e59d4777e6e0b2ac7218f1037958525269c)
(cherry picked from commit ab7e5bf25c907c08944b2fd6b37d3671149c1385)
(cherry picked from commit d43e94e7d2954c7a6bf046732f81bb774a6c0575)
@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-23T18:16:58.509476Z c99e23c PR opened
🔒 Security Review ✅ Completed 2026-09-23T18:20:13.798798Z c99e23c 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.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 14 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: 99d0eb6a-c5c2-41e0-abb1-dc5598a07ccf

📥 Commits

Reviewing files that changed from the base of the PR and between 5d880a1 and c99e23c.

📒 Files selected for processing (7)
  • devtools/continuity_cold_model.py
  • polylogue/storage/sqlite/archive_tiers/ops.py
  • tests/data/continuity/cold-model-plans.json
  • tests/unit/cli/test_archive_query.py
  • tests/unit/cli/test_read_view_classification.py
  • tests/unit/devtools/test_cold_model_plan.py
  • tests/unit/storage/test_ops_tier.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.

@Sinity
Sinity merged commit ac83e55 into master Sep 23, 2026
3 checks passed
@Sinity
Sinity deleted the work/campaign-wave12 branch September 23, 2026 18:27
Sinity added a commit that referenced this pull request Sep 23, 2026
…iter (#5489)

## Why this exists

Wave 12's `L4` lane added a new table to the **user tier** — durable,
irreplaceable, holding assertions, settings and annotation provenance —
through `CREATE TABLE IF NOT EXISTS` in the fresh DDL, touching no
migration and no census. I held that commit back from #5488 rather than
land it. This completes it properly.

Three independent controls objected. All three are now satisfied, and
none by weakening the control.

## 1. The migration

`user.db` is never rebuilt from source evidence. Fresh DDL alone gives
the table to *new* archives and silently leaves every *existing* one
without it — the "never strand existing durable archives with a schema
shortcut" rule, and the operator's live archive is one of those.

`migrations/user/003_session_marker_delivery.sql` is purely additive:
one table, one index, no existing table touched, no rows read or
rewritten, so the train declares no row-change allowance. Its
`.train.json` carries `sql_sha256` computed over the file and a declared
`backup_plan_ref`. `USER_TIER_VERSION` 2 → 3.

## 2. The writer

The upsert sat in `polylogue/storage/derived/session/marker_domain.py` —
a **derived** module mutating `user.db` directly. That is exactly what
`devtools gate layering`'s writer-module census catches, and the census
already carries a standing FINDING against another module for the same
shape.

It now lives with its tier's writer as
`user_write.advance_session_marker_delivery`, declared in
`layering.yaml`'s entrypoint inventory.

**The writer-module census baseline was not grown.** Adding a derived
module to the durable-writer baseline would have made the gate pass by
widening a ratchet, which is the opposite of what the ratchet is for.

## 3. Monotonicity — so the classification is honest

The upsert overwrote the position unconditionally. To declare it
`lifecycle_transition` in the durable-write census, it has to actually
*be* one: the conflict clause now carries its own prior state,

```sql
WHERE excluded.applied_at_ms >= session_marker_delivery.applied_at_ms
```

so a late or replayed delivery cannot rewind a position that has already
advanced. That is a real behaviour fix, not a label chosen to satisfy a
gate — and it is the property the census reason now cites.

## Verification

```
devtools gate layering    ->  0 violations
devtools verify --quick   ->  PASSED exit=0
devtools test tests/unit/storage/test_session_profile_derivation.py \
              tests/unit/daemon/test_session_profile_composition.py \
              tests/unit/storage/test_durable_change_train.py \
              tests/unit/storage/test_durable_tier_version_authority.py \
              tests/unit/storage/test_archive_tiers_ddl.py
-> PASSED exit=0
```

🤖 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

* **New Features**
* Session marker delivery progress is now recorded per session alongside
marker updates, helping preserve delivery state across recovery.
  * Older or repeated updates no longer move recorded progress backward.
* Delivery state is also recorded when a replacement contains no
markers.

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

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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