Repository navigation
Commit e130f90
[feat.contracts.sigma.D7+] the wire vocabulary, the ops read layer, and a docs gate that re-derives truth instead of trusting a string
Diary. Three agent lines landing together, all read-only or additive.
ENVELOPE + ERROR CODES (one home, two languages). backend/envelope.py loads
contracts/errors.json once and asserts the app.job_error subset relation AT
IMPORT TIME by parsing migration 007 — so declaring a code a job could carry
without adding it to the enum is an import failure, not a six-week drift.
normalize_meta() fixes the defect that made "Net charge" and "Compute time"
disappear on a cache hit: the computed and cache-hit paths returned different
KEY SETS, so the UI silently lost rows. v1 compatibility is mandatory and
implemented (to_v1) because the live client reads payload.cube flat; v2 is
opt-in. scripts/gen_error_codes.mjs generates the TS half deterministically,
and the test byte-compares the committed output against a fresh run — a
generated file that has drifted is worse than no generator. 25 tests pass.
OPS READ LAYER. backend/admin_queries.py: queue (with `overdue` = age >
budget, which is the 36-minute runaway made visible), cache_summary, stale
(raw bytes, not pg_size_pretty's string), producers, methods with their
refusal lists, blob_health, toolkits, snapshot. Read-only by construction.
Two numbers it surfaces that were previously narrated: 1 of 19 rows carry a
method_row_id, and the orphan blob count is 11 / 35,927,489 bytes —
cross-checked against bin/dirac-sweep's own predicate and an independently
phrased LEFT JOIN, with the test asserting equality and refusing to average
on disagreement. The DSN no longer hardcodes user=ivan, which was the one
thing stopping a stranger from running this repo. 14 tests pass.
DOCS GATE. scripts/check_docs_facts.mjs does not hardcode the right answer:
it parses each daemon's ThreadingHTTPServer((...)) call, chases variables
through os.environ.get defaults to a literal, and compares every documented
host:port against that. It found a FIFTH wrong host claim the brief missed,
and it kept resolving correctly while line numbers shifted under it from
concurrent edits — because it matches content, not lines. It also checks
every fenced bash command against package.json scripts and real paths. Wired
as gate 6; the suite is now six gates and all pass.
One claim in the brief was REFUTED rather than fixed, which is the outcome I
want from these sweeps: the "documented build command omits the rdkit asset
copy" defect was already fixed upstream in 3f0662d, proven empirically by
moving the assets aside and running only the documented command.
Nine findings about MY OWN contract files are recorded in the agent's report
and owed: iface.pyi's ErrorCode Literal lists a BAD_BASIS that exists
nowhere and omits three codes that do; FieldMeta is missing ~18 keys the
code really emits; iface.d.ts says envelope:1 where SPEC.md says 2. The
contracts drifted from the code within a day of being written, which is
exactly why the generated half exists.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F2MSV6FzZHf2hjz898RKZ71 parent 0c4e92d commit e130f90
11 files changed
Lines changed: 2779 additions & 7 deletions
File tree
- backend
- tests
- scripts
- src/app/services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
22 | 34 | | |
23 | 35 | | |
24 | 36 | | |
| |||
27 | 39 | | |
28 | 40 | | |
29 | 41 | | |
30 | | - | |
| 42 | + | |
| 43 | + | |
31 | 44 | | |
32 | 45 | | |
33 | 46 | | |
| |||
64 | 77 | | |
65 | 78 | | |
66 | 79 | | |
67 | | - | |
68 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
0 commit comments