Skip to content

feat(baton): batch inheritance — nearest declaration: ledger line, AILOG, Charter (#428) - #437

Merged
montfort merged 1 commit into
mainfrom
feat/baton-batch-inheritance
Sep 18, 2026
Merged

montfort merged 1 commit into
mainfrom
feat/baton-batch-inheritance

Conversation

@montfort

Copy link
Copy Markdown
Contributor

Closes #428.

The ratification (#332 §3) put a batch's declaration on a - **Work verb**: ledger line. The AILOG template and the Track C kit put it in the AILOG frontmatter, and read_batches read neither, so every batch came out undeclared. This PR implements one contract that gives each existing slot a role (maintainer's decision, AIDEC-2026-09-17-001).

Rule: nearest declaration

A batch takes the first of these that declares a verb:

  1. its own ledger line - **Work verb**: (and optionally - **Design provenance**:), the override for a heterogeneous batch;
  2. the AILOG's frontmatter, the homogeneous default for its batches (the slot the template already ships);
  3. the Charter(s) whose ledger this AILOG is, resolved exactly as straymark charter batch-complete does (originating_ailogs[0], else execution_ailogs[0]), when they all agree. This is the same agreement rule fix(baton): inherit task declarations from explicit Charter origins (#427) #430 uses for tasks.

Otherwise the batch stays undeclared.

  • Unit semantics. An override replaces the whole declaration: a verb line without provenance does not inherit the parent's upstream, and a provenance line alone declares nothing.
  • Unreadable sources. An unreadable AILOG frontmatter blocks inheritance for its batches, though their own lines still apply. An unreadable Charter blocks only Charter-level inheritance, and the CLI note now covers --granularity batch.
  • Live text only. HTML comments, fenced blocks and lines after another heading never declare.
  • Exact IDs. AILOG ids compare on the CLI's five-segment key, so …-001b ≠ …-001, and a slugged id resolves.

Refactor

  • The parent index (CharterOrigin + ledger_ailog, ailog_key) and agreed() are shared by tasks and batches.
  • task_inheritance_blockers becomes inheritance_blockers.

Impact (read-only, git status unchanged)

Corpus Batches classified (all undeclared before) Source
Sentinel 22 Ledger AILOGs of Charters 54 (operate), 55 (implement/new) and two more
LNXDrive 7 Charter 02 through its ledger AILOG
Estoa 8 AILOG frontmatter

Spot-checked against the source AILOGs and Charters.

Validation

  • cargo test -p straymark-baton --locked: 112 passed. The 9 new cases are in tests/batch_inheritance.rs; 8 of them fail before the change (the ninth is a negative case).
  • cargo clippy -p straymark-baton --all-targets --locked -- -D warnings is clean. straymark validate reports 0 errors.
  • Ratification §3 and the Track C kit now describe the same contract. AILOG: AILOG-2026-09-17-004.

Heads-up: this PR and #436 both edit adjacent rows of the Track C kit table. Whichever merges second needs a one-line rebase, which I will do.

🤖 Generated with Claude Code

…LOG, Charter (#428)

A batch now takes the nearest declaration: its own `- **Work verb**:`
ledger line (the ratified override), else its AILOG's frontmatter (the
slot the AILOG template already ships), else the Charter(s) whose ledger
that AILOG is — resolved exactly as `charter batch-complete` does
(originating_ailogs[0], else execution_ailogs[0]) — when they all agree.

- An override replaces the whole declaration; a provenance line alone
  declares nothing. Comments, fences and other sections never declare.
- An unreadable AILOG frontmatter blocks inheritance for its batches; an
  unreadable Charter blocks only Charter-level inheritance.
- The parent index and the agreement rule are now shared with tasks;
  `task_inheritance_blockers` becomes `inheritance_blockers`.
- Ratification §3 and the Track C kit now describe one contract.

Read-only: Sentinel 0 -> 22 batches classified, LNXDrive 0 -> 7,
Estoa 0 -> 8. AIDEC-2026-09-17-001, AILOG-2026-09-17-004.

Closes #428.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@montfort
montfort force-pushed the feat/baton-batch-inheritance branch from a3b087d to 8597124 Compare September 18, 2026 04:31
@montfort
montfort merged commit 4081f0c into main Sep 18, 2026
1 check passed
@montfort montfort mentioned this pull request Sep 18, 2026
montfort added a commit that referenced this pull request Sep 18, 2026
Release the Track C fixes that landed after baton-0.2.0: task inheritance
(#430), batch inheritance (#437) and inventory hygiene (#435). 0.3.0 rather
than 0.2.1: the adopter already measured a from-source "0.2.1" without them,
so reusing that number would blur its telemetry. The Track C kit now asks
for baton >= 0.3.0 (and CLI >= 3.49 to declare follow-ups).

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.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.

[adopter] Baton batch placement conflicts between ratification and Track C kit

1 participant