Skip to content

docs: Record the workload artifact consolidation census and dispositions - #5029

Merged
Sinity merged 1 commit into
masterfrom
chore/workload-artifact-census
Sep 13, 2026
Merged

Sinity merged 1 commit into
masterfrom
chore/workload-artifact-census

Conversation

@Sinity

@Sinity Sinity commented Sep 13, 2026 •

Copy link
Copy Markdown
Owner

Advances polylogue-1xc.14.1, a direct blocker of the final archive build. The
bead stays open — AC2 and AC11's deletion half are explicitly not closed, and
the ledger says so.

Summary

Record the workload-artifact consolidation census and a per-duplicate
disposition ledger. Documentation only: no test infrastructure was retired.

Problem

polylogue-1xc.14.1 AC2/AC11 require a before/after census and the retirement
of duplicate artifact builders. Neither had been produced, and the notes citing
tests/infra/pathology_zoo.py were stale — it was retired by eb8be9427.

What the census actually found

tests/infra recursive *.py, first-parent master:

date commit files LOC top defs workload_artifacts.py workload_declarations.py
2026-08-25 037a64f 88 26,601 902 3,245 —
2026-09-05 1a53a1f 95 28,486 981 3,381 —
2026-09-08 5218889 101 32,043 1,076 3,542 —
2026-09-13 a3d6ffe 104 33,367 1,106 3,191 509

The hotspot shrank (3,542 → 3,191), but only by extracting 509 lines into a
second owner: the pair now totals 3,700 against a 3,542 single-file peak, while
tests/infra grew 25% overall. Consolidation has redistributed, not reduced.
That is the honest reading and it is why AC11's deletion half stays open.

Fan-in on workload_artifacts is 21; the real hubs are storage_records (144)
and live_ingest (73). pathology_zoo.py and pathology_composer.py are both
gone.

Dispositions (AC2)

No code was retired. Every candidate was a deliberate production seam, a
shared primitive, or too widely called to touch inside a census — and the bead's
own caution governs here: create a narrow leaf only for a true duplicate with an
explicit owner.

Two genuine duplicates, both deferred with an owner rather than retired:

  • archive_scenarios.py (ArchiveScenario.seed, seed_workspace_scenarios) — a
    true direct-index seeder with no manifest, but 25 importing modules; migration
    would touch many test files.
  • whale_fixtures.py (acquire_codex_revision_chain) — cacheable scale
    artifacts published without a manifest; wrapping the production acquisition
    seam is a design change, not a deletion.

Kept, with reasons: query_corpus.py (materializes through the production
writer, caches nothing, so owns no artifact identity), corpus_program.py and
convergence_harness.py (delegate to production seams, own no cached artifact),
storage_records.py (SessionBuilder is the primitive the manifest route is
built on). Not duplicates: live_ingest.py is the single test seam onto
write_parsed_session_to_archive — retiring it would create duplication;
reference_model.py and source_composer.py were grep false positives.

AC13 — the earlier claim was overbroad

It was previously reported that AC13's mutation testing is unimplementable
because the substrate carries no semantic output. That is only half true.
CorpusArtifactManifest.__post_init__ calls reject_semantic_metadata, and
SEMANTIC_METADATA_PREFIXES = ("expected_", "oracle_", "pathology_", "case_")
refuses oracle-shaped keys — so oracle substitution genuinely has no seam. But
the other four mutation classes do have seams and are already covered by
hostile tests in test_workload_artifacts.py: identity reuse, schema-identity
keying, forged receipts, same-size corruption, tampered clones, sibling
isolation, lease mutation.

Proposed replacement wording is in the ledger; it needs acceptance before AC13
can close.

AC6 — satisfied

No pathology_zoo/pathology_composer. PathologyName/REQUIRED_PATHOLOGIES
live in query_contract.py beside the query laws that consume them, which AC5
requires rather than forbids. No scale-tier enum survives; the remaining
session_count is a bundle-shape parameter. Malformed material exists only as
fuzz corpora and Hypothesis strategies beside their laws.

Verification

devtools test tests/unit/infra      PASSED exit=0
  receipt 20260913T193932Z-focused-test-1295736-cb27aa24
devtools verify --quick             exit=0, zero out-of-sync lines

docs/README.md is generated, so the ledger is registered in
devtools/docs_surface.py and re-rendered rather than hand-edited — the first
verify --quick caught exactly that and it was fixed at source.

devtools test tests/unit/devtools -k workload exits 2 with
Interrupted: 2 errors during collection from _UnprintableCode.__repr__ in
test_devtools_main.py and test_project_motd.py. That is the pre-existing
collection break owned by polylogue-6rcy2, not this change: 0 of 2 selected
tests ran, and running both selected nodes directly passes (receipt
20260913T195657Z-focused-test-1331568-6a55f3fe).

Per CLAUDE.md these greens prove only the selected scopes.

Bead status after this

Satisfied: AC1, AC3–AC10, AC11's reporting obligation, AC12.
Open: AC2 (two real duplicates recorded, not retired), AC11's deletion half (the
aggregate did not fall), AC13 (needs the reworded criterion accepted), AC14
(blocked only by the unrelated collection break).

🤖 Generated with Claude Code

https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK

Summary by CodeRabbit

  • Documentation
    • Added a new design note, “Workload Artifact Consolidation Ledger,” to the documentation reference.
    • The note provides a structured inventory of workload and corpus artifact builders, including ownership, relationship metrics, candidate classifications, and criteria status.
    • Added a corresponding entry to the Design Notes table for easier discovery.

Measure tests/infra growth and the workload artifact hotspot, name every
remaining non-canonical archive builder, and record a disposition for each
instead of refactoring during a census.

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

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 768e32fa-fbeb-4017-af8d-5f36d29763c3

📥 Commits

Reviewing files that changed from the base of the PR and between a3d6ffe and 3546059.

📒 Files selected for processing (3)
  • devtools/docs_surface.py
  • docs/README.md
  • docs/plans/workload-artifact-consolidation-ledger.md

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (2)
Classify every schema change first: durable tier means additive numbered migration plus verified backup manifest; derived tier means canonical DDL plus declared lifecycle delta.

📄 CodeRabbit inference engine (CLAUDE.md)

Files:

  • devtools/docs_surface.py
Use `devtools`, never bare `pytest`.

📄 CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/README.md
  • devtools/docs_surface.py
  • docs/plans/workload-artifact-consolidation-ledger.md
🪛 markdownlint-cli2 (0.23.2)
docs/plans/workload-artifact-consolidation-ledger.md

[warning] 131-131: Ordered list item prefix
Expected: 1; Actual: 13; Style: 1/1/1

(MD029, ol-prefix)


📝 Walkthrough

Walkthrough

The change adds a ledger for workload-artifact builders. It records module metrics, ownership, candidate dispositions, and criterion status. The new page is registered in the documentation registry and linked from the Design Notes table.

Changes

Workload Artifact Ledger

Layer / File(s) Summary
Ledger content
docs/plans/workload-artifact-consolidation-ledger.md
Adds a census and disposition ledger for workload-artifact modules. It records ownership, dated metrics, module relationships, candidate classifications, and AC2, AC6, AC11, and AC13 status.
Documentation registration
devtools/docs_surface.py, docs/README.md
Registers the ledger as a design document and adds it to the Design Notes table.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 35460

This documentation-only change adds and indexes the ledger, with no remaining merge-blocking defect identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: documenting the workload artifact consolidation census and dispositions.
Description check ✅ Passed The description includes the required summary, problem, solution details, verification commands, and remaining work. It does not use an explicit Solution or Risks and Follow-ups heading, but the relev…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/workload-artifact-census

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

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

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

@Sinity
Sinity merged commit 7a9d079 into master Sep 13, 2026
3 checks passed
@Sinity
Sinity deleted the chore/workload-artifact-census branch September 13, 2026 20:33
Sinity added a commit that referenced this pull request Sep 13, 2026
…nfig (#5032)

Advances `polylogue-7lhl5`. Resolves 47 of the 108 failures reproduced
at
`14e1d821f`.

## Summary

Replace embedding-status config doubles with a real `PolylogueConfig`
behind one
shared helper, and retarget four leftover insight rebuilds onto the
shared
materializer.

## Problem

The full corpus could not collect as one unit until #5031, so most of
these tests
had never run. The measured red surface at `14e1d821f` is 108 failures.
Two
clusters account for 47.

## Production is right — deliberately unchanged

Before editing test files, the question was whether the production
nominal
dispatch in `embedding_status_settings_from_config` is itself wrong. It
is not,
for two reasons worth recording:

1. **It is a lossy projection where identical attribute names mean
different
   things.** A legacy `Config` has no `embedding_enabled` and no
`embedding_max_cost_usd`, and reaches its Voyage key via `index_config`;
`PolylogueConfig` has all of them directly. `EmbeddingStatusSettings`'s
own
docstring makes `None` mean *"the supplied configuration did not observe
that
fact — not disabled, not unbounded."* A Protocol can express which
attributes
an object has, never **which vocabulary it speaks**, so the two branches
would
   collapse and emit `None`s that read as observed-absent rather than
   unobservable.
2. **No production caller can reach the refusal.**
`status_payload.py:1297` uses
   `load_polylogue_config()`; `status_payload.py:1179` and
`operations/daemon_status.py:77` are typed `Config | PolylogueConfig |
None`
   and their production callers (`daemon/cli.py:3052,3057`,
`daemon/status_snapshot.py:420`, `cli/shared/check_workflow.py:134`)
pass no
   config at all.

So it is a fail-loud partition guard: a third config type must be a
deliberate
edit there, not a silent structural match. Fixing the tests was correct.

## Solution

**`24d060ebf`** — the `_Cfg` cluster (29, and confined to a single file
rather
than spread across the suite as first assumed). #5026's pattern is
factored into
`tests/infra/embedding_config.py` and used from both call sites instead
of
per-file copies — that duplication is exactly what the consolidation
census
(#5029) is trying to reduce. `test_embed_status_fast.py` 32 failed → 15;
zero
`_Cfg` TypeErrors.

**`96e79d095`** — cluster B (18). Four callers that `f494b276f` missed,
retargeted
onto `materialize_session_insights`. Readiness 4→0, taxonomy 6→0,
snapshots
15→7.

### Anti-vacuity

- `_Cfg`: tests still drive the real
  `load_polylogue_config → embedding_status_settings_from_config →
EmbeddingStatusSettings` route. The helper was verified
behavior-identical
(same five values; `config.py:411-429` are plain pass-throughs), so
nothing was
relaxed. Reverting to a double makes them red with the same `TypeError`,
and a
production field rename now breaks these tests instead of being absorbed
by a
  double that matches only itself.
- Cluster B: the tests assert what the materializer *produces*, and
`materialize_session_insights` calls `rebuild_session_insights_sync` —
the same
function both sanctioned owners reach — so deleting it leaves every
assertion
  red. Authorization-route coverage stays separate in
  `test_operation_executor_routes.py`.

## Verification

```
devtools test <5 selections>   receipts 20260913T213830Z-...-1607196-b7978ae1,
                               ...-1617758-93b10ec5, ...-1633508-61a11e02,
                               ...-1635467, ...-1640057
devtools verify --quick        14/14 gates ok
```

No full-corpus run (a host reaper kills long background tasks; the
corpus gate
runs through the declared `verify_all` operation instead).

## A measurement that refuted a confident inference

Cluster C was triaged as "small and clear: widen the lambdas to
`**_kwargs`." It
was implemented and **measured to be wrong** — it peeled three layers
(`index_path` → `operation_vector_connection` → `index_db_path`) with 7
failures
surviving each round. `test_query_exec_laws.py` holds **38 hand-written
`FakeArchiveStore` copies** that have drifted from a production class
that moved.
Re-synchronizing them is the duplication problem itself, not a
one-liner. It was
**reverted rather than chased attribute by attribute**, and needs its
own owner.

## Deliberately left, with owners

- **Cluster A residual, 15** — `test_embed_status_fast.py`. Pre-existing
and
  previously masked by the `TypeError` (confirmed three ways). Cause:
`EMBEDDINGS_SCHEMA_VERSION` 5→6 added `message_content_hash`, so the
v5-shaped
fixture's metadata alone no longer certifies a vector. Needs a v6
fixture with
  real physical vectors under sqlite-vec, not a pragma bump.
- **Cluster C, 7** — the `FakeArchiveStore` drift above.
- **D1–4, 34** — reset / excise / archive-maintenance / json-output, all
stale
against daemon sole-write authority. Mechanical but needs a judgment
call about
  what each should now assert; one owner for all four.
- **D5, 3 — a genuine PRODUCT BUG**, filed separately:
`cli/commands/status.py`
  rejects any non-builtin `daemon_url` and then renders the refusal as
**"Daemon: running"** with `daemon_reachable = True` when no daemon
exists.
- **D6** — mostly environment/timing, but
`test_daemon_resilience.py:362`
  (`(None,'signal') != ('SIGTERM','signal')`) is a real shape mismatch.
- **D7** — `.archive-ownership.lock` PermissionError, carrying a real
question
about whether a pure read should need write access. The `no running
event loop`
  traceback there is **not** a defect — caught by design at
  `core/async_bridge.py:50-53`.

Attribution is more spread than expected: only cluster A traces to the
convergence rewrite; B to `f494b276f`; C and D5 to `1d901ec73`; D1–3 to
`6be5d2fd7`; D4 to `cfc4c73ec`.

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

https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK

---------

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