Skip to content

contract-stateless: the plugin-logging capture is the one sanctioned per-thread slot; a second stays red - #944

Merged
MattJackson merged 2 commits into
predevfrom
lane-cabi-stateless-capture
Oct 15, 2026
Merged

MattJackson merged 2 commits into
predevfrom
lane-cabi-stateless-capture

Conversation

@MattJackson

Copy link
Copy Markdown
Collaborator

CONTRACT-ABI lane, item 2 (ruling).

ARCHITECT ruling 2026-10-14: __BUSBAR_CAPTURE (abi/sdk/door.rs, the door macro's per-thread capture) is the ONE sanctioned per-thread slot — SPEC l.1297-1300 mandates "one slot per thread per plugin image" (vs l.1474/1536 contract-stateless); it expands in the plugin image. Exempted explicitly in qa/contract-stateless.toml with the cite and drain none — mandated by SPEC 1297.

  • xtask/src/gates/one_abi.rs: ledgers accept [[sanctioned]] (rule, file, item, cite, drain). It excuses exactly one finding of its key and is not a [[finding]] row, so a gate whose last row drains owes nothing; a second site of the key is NEW/red; a sanction the tree no longer carries is STALE; --write keeps sanctioned tables.
  • qa/contract-stateless.toml: the capture's two rows (static __BUSBAR_CAPTURE, thread_local!) move to [[sanctioned]] — 44 -> 42 rows.

RED (gate selftest, contract_stateless.rs): a second thread_local! planted in door.rs is red (on predev the un-counted row admitted it); a stale sanction is red.

No product code change.

…oned per-thread slot; a second stays red

ARCHITECT ruling 2026-10-14: the door macro's __BUSBAR_CAPTURE thread_local (abi/sdk/door.rs) is
the ONE sanctioned per-thread slot (BUSBAR-1.6.0.md l.1297-1300: "one slot per thread per plugin
image"; it expands in the plugin image, not in shared contract state), exempted explicitly in
qa/contract-stateless.toml with that cite and the drain "none — mandated by SPEC 1297".

The one-abi ledgers gain [[sanctioned]] (rule, file, item, cite, drain): it excuses exactly ONE
finding of its key and is no work-list row, so a gate whose last [[finding]] drains owes nothing.
A second site of the same key is NEW and red; a sanction whose site left the tree is STALE.
--write keeps the sanctioned tables. The capture's two rows (static __BUSBAR_CAPTURE,
thread_local!) move from [[finding]] to [[sanctioned]]: contract-stateless 44 -> 42 rows.

RED (selftest): a second thread_local! planted in door.rs beside the capture is red (on predev
the un-counted row let it through), and a stale sanction is red.
@MattJackson

Copy link
Copy Markdown
Collaborator Author

#1028 also edits qa/contract-stateless.toml: it strikes the codec.rs contract-stateless:static rows ENTROPY_SOURCE and WALL_CLOCK (different rows).

@MattJackson

Copy link
Copy Markdown
Collaborator Author

Rule 20 note from #1030 (row 155): qa/contract-stateless.toml strikes services.rs OnceLock/KEPT/FILLING and codec.rs USAGE_TAP_FAULT_*. KEPT is adjacent to your door.rs hunk, so a test merge conflicts on adjacent rows only. Whoever lands second settles them by hand (rule 13).

qa/contract-stateless.toml settled by hand (rule 13): predev's strikes (services.rs OnceLock, FILLING, KEPT; codec.rs USAGE_TAP_FAULT_LATCH, USAGE_TAP_FAULT_REPORTER) kept; this branch's own delta applied on top: the two door.rs capture-slot findings (__BUSBAR_CAPTURE static, thread_local!) move to [[sanctioned]]. No row added, none raised.
@MattJackson
MattJackson merged commit 2968841 into predev Oct 15, 2026
1 check was pending
@MattJackson
MattJackson deleted the lane-cabi-stateless-capture branch October 15, 2026 05:33
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