Skip to content

Ezri's successor is commissioned with the violin skill and regains the level the last crew proved; the proof is kept in a ledger a clean slate clears (S2b, L6b) - #2033

Merged
seangalliher merged 6 commits into
mainfrom
feat/ad-1378-s2b-l6b-20261202
Dec 3, 2026

Conversation

@seangalliher

@seangalliher seangalliher commented Dec 3, 2026 •

Copy link
Copy Markdown
Owner

Refs #1935

What changes

When a new crew takes Ezri's slot, she is commissioned with the by-ear skill at its lowest level (FOLLOW), and the next complete passed by-ear qualification she earns restores the level the previous crew proved; the proof is kept in an append-only ledger that --clean-slate clears and no reset tier names. It rides on S2a's lesson service and L6a's skill (merged as #2032) and is off wherever lessons are off, so merging it changes nothing for a vessel that has not enabled lessons.

  • The ledger (probos.skills.nature, standard library only). <data dir>/skill-nature/ledger.jsonl: one JSON line for each complete by-ear pass (the harness passed, no error code, and she holds a level), append-only (append, rows, latest; no call that rewrites or deletes), lines of at most 16,384 bytes. A torn last line is ended by the next append and never repaired; a malformed line is skipped and counted (one WARNING per read, never a line's content); a link, a junction or a node of the wrong kind at the directory or the file is refused. The link rule is the reset's own, carried as a copy and held equal to it by a test, because AD-1341 S6's census keeps services out of the snapshot module (contract A142). One lock per ledger is held for the whole call, so a caller cancelled mid-call leaves the call whole.
  • The reset (src/probos/__main__.py; this is the high-risk edit). probos reset --clean-slate now clears skill-nature/ after procedures/, through one tuple (_NATURE_DIRS), after the clearance marker is recorded in the Ship's Archive; if the marker cannot be written neither directory is deleted. A link, a junction or a file at either name is refused before anything is recorded or deleted. No reset tier, kept list or subdirectory list names skill-nature/: a tier-2 reset clears skills.db and keeps the ledger. The dry run, the confirmation and the summary say a successor will not inherit the proven skills, and a reset without the flag says they are kept. The AD-1346 file-write census goes from 76 to 77 files.
  • The writer (_record_proven, module function in skills/violin/skill.py). After the bridge has been asked, a complete pass reads the slot's latest row and writes one: requalified when that row is of another timeline, proven otherwise, superseding the row it followed, with model null. While the latest row is of another timeline and holds a level above the one the bridge gave her, one update_proficiency restores it. Anything less than a complete pass reads and writes nothing. Each step fails alone (a ledger that cannot be read: one WARNING, no restore, no row; a restore that fails: skill_not_updated, no row; a row that cannot be written: one ERROR, the level stands), and a cancellation passes through every one.
  • The reader (commission_from_nature, at boot, before the recording store is built). Each successor (the slot's latest row is of another timeline, the live agent is of the row's type, she holds no record of the skill, of any kind) is commissioned at FOLLOW with the source commissioning; a failure for one slot does not stop the next. _wire_lessons builds the ledger only where the skill service exists. Nothing she can read says where a level came from.
  • The docs. docs/architecture/lessons.md (the skill, its qualification, nature, what a clean slate clears), the S2b entries in PROGRESS.md and DECISIONS.md (with the AD ledger pair regenerated by scripts/gen_ad_ledger.py, as its own generated commit), and the contract revised to 2w (A143).

What the Captain should know

  • A reset-path edit. --clean-slate now clears one more directory. Nothing else in the reset moved (the contract's pinned tier tests are unedited). The only existing tests edited are the AD-1346 file-write census pair (76 to 77 files; open 21 to 22; System 71 to 72) and tests/test_ad1378_s2_config.py (3 lines: its placeholder for the nature directory, which said the reset code did not have it yet, now reads _NATURE_DIRS). This is the first thing to look at in the diff: src/probos/__main__.py, _NATURE_DIRS and its users.
  • No successor holds her level at boot. Every inheritance re-qualifies: she is commissioned at FOLLOW and a complete passed by-ear qualification restores the proven level, normally her first one (each complete pass is judged by the slot's latest row as read at its close, against its own timeline; what the pass after a failed restore, a failed append or a failed sync does is not stated anywhere until a test runs it: AD-1378 S2b follow-ups: findings recorded and not repaired in the review rounds (the violin skill, its by-ear qualification, the lesson hooks and the proven skill as nature) #2031 C6). No part of the nature chain reads which model her runs used, so every row's model is null and nothing holds a level for a model that has not changed (follow-up B14).
  • Restart. This changes Python, so a restart is needed for it to take effect, but nothing changes on the running vessel until lessons.enabled is on (the whole feature is wired in the lesson wiring), and the live checks (S0 and S1 installers and smoke scripts, then that restart) still wait for his go.
  • One finding that is not repaired here (follow-up C1, AD-1378 S2b follow-ups: findings recorded and not repaired in the review rounds (the violin skill, its by-ear qualification, the lesson hooks and the proven skill as nature) #2031): the bridge (existing code) and the restore each read her level and then write it with no condition, and the framework has no compare-and-set; a level the Captain sets through the skill route within the milliseconds between a lesson close's read and write is overwritten by it. Narrow, pre-existing for the bridge, and stated once in the docs.
  • A premise of the contract was wrong and is corrected (A143 (b)): the cognitive journal does record the model of a single-pass call (the answering model the provider reported, else the id sent, else unknown) and writes unknown at its other three record sites, an agentic turn's among them, so "no reader exists" became "no reader is wired into nature". The policy (every row's model null) does not change.

What this does not claim

  • No lesson has run on the vessel: every test uses stand-in workers and real components over temporary directories.
  • A ledger write that fails at its sync may leave the row in the file; the writer does not retry it.
  • The residual check/use window between lstat and open is the reset's own, carried by design (follow-up C2).

Review and proof

Diff Reviewer rounds on gpt-6.1-sol (pinned on every call and checked against the session log), my own hand mutants of each milestone, and the docs checked claim by claim by a second reviewer. Each milestone was committed only on a READY verdict with zero Size findings.

Slice Rounds Size findings Hand mutants (killed) Exit run
Contract rev 2v (A142: the ledger carries the reset's link rule) the Architect's decision at the L6b1 stop 0
L6b1 the ledger, the reset, the census 2 (a fresh reviewer, then the delta) 0 64 (62) in round 1, 70 (70) in round 2 325
L6b2 the writer, the reader, the wiring 2 (a fresh reviewer, then the delta) 0 (1 in round 1, repaired) 48 (48) on the first candidate; 12 more of the kind round 1 found, 6 of which survived the first candidate; 60 (60) on the second 1,445
L6b3 the faculty page, the trackers, the contract text 4 claims-check rounds (a fresh reviewer, then three deltas); an Architect brake after round 3 decided to split, and the reduced candidate's one review (round 4) was READY 0 claims checks of every sentence

Round 1 of L6b2 found no defect in the code and three gaps in its tests (a row's fields copied from the row she follows were accepted, the ledger's construction without the skill service was not observed, two one-use helpers); the repair seeds the old row with a different value in every field and asserts the whole row from her own lesson. Round 1 of the docs found six clauses that said more than the code does (a clean slate "touches nothing but" two directories, "never lowers a level", "at her first pass", "has moved once", "no part of the vessel says which model", a privacy test that ran one lesson less than the page said), and the same clauses in the contract; all are corrected. Rounds 2 and 3 found seven and three more, none in the code: every one sat in a sentence of mine that predicted what a LATER pass does after another pass's failure, or in the sentence about the model. The Architect's brake after round 3 (the rule in _record_proven was right) split the docs: the page states the rule once and each failed step's consequence for the pass it fails in, with its test, and every prediction about a later pass is deleted unless a named test runs that pass (#2031 C6 holds the rest); round 4, the one review of the reduced candidate, was READY with no findings.

  • Gate: the canonical gate (scripts/run_test_gate.py --label ad-1378-s2b-nature --receipt logs/gates/ad-1378-s2b-nature.receipt.json, the wrapper's default 12 workers, none lost) passed on head 57048cd8 (tree ab7ac5cd6933520ee6fce050a47284b8cd8220dd): the preflight (config reference, config profiles, config facade, AD ledger, seam contracts, architecture fitness, store registry, compileall) exited 0, then 60,095 tests collected: 59,920 passed, 175 skipped, 0 failed, 0 errors, 7 subtests passed, in 46 min 54 s (2,884.7 s for the wrapper). The receipt validates against that head and tree, and origin/main (b4e3e196) had not moved when the branch was pushed.
  • CI: green on head 57048cd8 (run 47023782146): python-tests-shard 1 to 3 (14 min 41 s, 19 min 59 s, 16 min 37 s), python-tests, ui-tests (6 min 30 s), desktop-tests and discord-adapter-tests.
  • Size findings: 1 in total: L6b2 round 1 (two one-use helpers, deleted in round 1 in the repair delegation). L6b1 and L6b3 have none, and the final candidate of every slice carries 0.
  • Follow-ups: the findings recorded and not repaired, each with its reach, are in AD-1378 S2b follow-ups: findings recorded and not repaired in the review rounds (the violin skill, its by-ear qualification, the lesson hooks and the proven skill as nature) #2031 (Part C: C1 to C8; B14 corrected; B17, the faculty page, is done by this change).

seangalliher and others added 6 commits December 2, 2026 14:54
…he reset's link rule

The L6b1 build stopped on AD-1341 S6's census of the importers of
probos.knowledge.records_snapshot (tests/test_ad1341_s6_records_snapshot.py:665-684):
the ledger imported the reset's two link helpers, and the census keeps every
agent, service and Oracle tier out of that module. The Architect's decision
(Design: holds): the ledger carries its own two-clause copy of the rule, as
cognitive/builder_paths.py does, and imports nothing from records_snapshot, so
the census stays as it is and A141 (c) holds for every S6 test line.

Adds A142, the K5b property that the ledger's link rule is the reset's, two
tests in section 16 (the parity of the carried rule and its lstat), and
mutation rows Z84 (the ledger's lock, which the L6b1 brief had and the table
lacked), Z85 and Z86. Text only.

Refs #1935

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The review of L6b1 (round 1) found that A142's evidence cell cited the
stopped build's nature.py (its import of records_snapshot and its line
numbers) as if it were the candidate. The cell now says which build each
check read: the stopped build (importers __main__.py and nature.py; the
failing census), and the repaired one (__main__.py alone; the carried rule
cited by name, not by line). Text only; revision 2v is otherwise unchanged.

Refs #1935

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…lears it

Adds probos.skills.nature (standard library only): the append-only JSON-lines
ledger of proven skills under <data dir>/skill-nature/ (NatureRow and
SkillNatureLedger with append, rows and latest). One lock per ledger, held to
the end of each call, so a caller cancelled mid-call leaves the call whole and
the next call waits. A torn tail is ended with a newline and never rewritten; a
malformed line is skipped and counted; a link, junction or wrong-kind node is
refused through the reset's own two-clause link rule, carried in the module
(contract A142) and not imported from probos.knowledge.records_snapshot, so
AD-1341 S6's census of that module's importers stays unedited. Nothing writes
the ledger yet (L6b2).

probos reset --clean-slate now clears skill-nature/ as well as procedures/,
through one tuple (_NATURE_DIRS), after the clearance marker is recorded; no
reset tier, always-preserved list or reset-subdirectory list names it. The dry
run, the confirmation, the summary lines and the --help text say a successor
will not inherit the proven skills. AD-1346 file-write census: 76 to 77 files.

Reviewed in two rounds on a second model (round 1 not ready: a read released
the lock before it parsed, A142's evidence text cited the wrong build, the help
line was untested; round 2, the delta only, ready; Size findings 0). Hand-made
defects: 62 of 64 caught in round 1, 70 of 70 in round 2.

Refs #1935

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ger; a successor is commissioned from it and regains the proven level at a complete pass

ViolinSkillChain takes the ledger (nature=None is L6a's behaviour exactly). At
a close, after the bridge has been asked, a complete pass (the harness passed,
no error code, and she holds a level) reads the slot's latest row and writes
one: requalified when that row is of another timeline, proven otherwise,
superseding the row it followed, with model null (no reader of the model her
runs used is wired into nature). When the row is of another timeline and holds a
level above the one the bridge gave her, one update_proficiency restores it.
Anything less than a complete pass reads and writes nothing. A ledger that
cannot be read means no restore and no row (one WARNING); a restore that raises
or finds no record means skill_not_updated and no row (one ERROR); a row that
cannot be written is one ERROR and the level she holds stands. Each step fails
alone and a cancellation passes through every one. The writer and the reader are
module functions in skills/violin/skill.py (ViolinSkillChain stays 170 lines and
7 methods), work from the snapshot the close made and import nothing from
probos.knowledge.records_snapshot.

commission_from_nature gives each successor the skill at FOLLOW at boot, with
the source commissioning: a slot whose latest row is of another timeline, with
a live agent of the row's type and no record of the skill (a record of any
kind, a suspended one included, is never overwritten). A failure for one slot
does not stop the next. _wire_lessons builds the ledger only where the skill
service exists, reads the vessel's timeline, runs the commissioning before the
recording store is built and gives the chain the ledger. Nothing she can read
says where a level came from.

Reviewed in two rounds on a second model. Round 1: not ready, no defect in the
code and three gaps in the tests (a row's fields copied from the row it
follows were accepted, the construction of the ledger without the skill
service was not observed, two one-use helpers); round 2, the delta only, ready,
Size findings 0. Hand-made defects: 48 of 48 caught on the first candidate;
12 more of the kind round 1 found (6 of them survived the first candidate),
and all 60 are caught on the second.

Refs #1935

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…he trackers and contract revision 2w (A143)

Text only: production code and tests are byte-identical to L6b2.

docs/architecture/lessons.md gains the skill and its qualification (what it
grades, what passes, which lessons, how far it moves her level, what is
written, the error codes, when a step fails, the other runs of the test) and
nature (the ledger, what writes a row, reading, --clean-slate, commissioning
at boot, the restore, the same timeline never inherits, nothing a test
searches says where a level came from, no model reader, when the ledger cannot
be read or written). PROGRESS.md and DECISIONS.md carry the S2b entries (D23,
the chain, the qualification, A142, the reversal: S2b shipped as two merges).
The contract is revision 2w: A143 corrects clauses of A141 and section 13 that
said more than the code does (the restore is judged at each complete pass by
the slot's latest row against the pass's own timeline, normally her first; the
cognitive journal records the answering model of a single-pass call and
`unknown` elsewhere, so what is missing is a reader wired into nature; which
reset sites iterate _NATURE_DIRS; the bridge and the restore are each a read
followed by an unconditional write).

Checked claim by claim by a second model: three rounds, the round-three brake,
and one review of the reduced candidate (ready, no findings, Size 0). Round 1 found six
clauses that said more than the code does; rounds 2 and 3 found more of the
same kind in the sentences the repairs added (what a LATER pass does after
another pass's failure; the journal's model fallback). The round-three brake
(the Architect, split) kept the rule and each failed step's consequence for the
pass it fails in, with its test, and deleted every prediction about a later
pass that no test runs; those come back with the test that pins them (#2031
C6).

Refs #1935

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…_ad_ledger.py)

Text only, generated. The S2b entry in PROGRESS.md moved the head-shaped lines the ledger lists, and the git layer now carries the AD-1378 subjects of the S2b commits. scripts/gen_ad_ledger.py --check passes; the gate's preflight runs the same check.

Refs #1935.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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