Repository navigation
contract-stateless: a test-seal-gated module is test code (stacked on #996) - #1002
Draft
MattJackson wants to merge 3 commits into
Draft
MattJackson wants to merge 3 commits into
MattJackson wants to merge 3 commits into
Conversation
…oves out of busbar-contract
THE DESIGN A.8 "Statelessness" (BUSBAR-1.6.0.md l.3701) and C.2 (l.3893: "Contract statics
(codec.rs, records.rs:94, ids.rs:330): deleted, with host tables used instead"). The image's one
vocabulary is process state, so it is the host's: busbar_kernel::vocabulary holds
Registration, MAX_VOCABULARY, VOCABULARY and FROZEN, moved verbatim but for the docs that
reasoned about a plugin reaching the interner (a plugin's closure is the contract, which now
holds none of it). Callers in the composition root and busbar-llm name busbar_kernel::Registration;
plane crates' docs name the host's interner in prose. qa/contract-stateless.toml strikes the
three ids.rs rows (LazyLock, FROZEN, VOCABULARY) this drains.
RED: the vocabulary tests move with it (busbar-kernel tests/vocabulary_{cap,freeze,resolve,intern}.rs),
naming busbar_kernel::Registration; the contract-stateless ledger no longer forgives ids.rs.
…ire carries every kind as data
THE DESIGN A.8 "Statelessness" (BUSBAR-1.6.0.md l.3701) and C.2 (l.3893, "records.rs:94 ...
deleted"). records::scope_kinds::REGISTERED was write-only: since 1.6.0 SDK-SCOPEKINDS the wire
serializes every kind (registered or not) under its own allowed_{kind}s field, and nothing in the
workspace read is_registered but its own test. The registry, register/is_registered and
register_scope_kind go; the kernel's plane fold stops registering scope kinds; the store
conformance fold's scope-kind round trip runs as before over the key's own data.
qa/contract-stateless.toml strikes the records.rs REGISTERED row this drains.
…eature is test code Coordinator ruling 2026-10-14 (ruling 1 (a)): the gate counts busbar-contract state "outside test code" (BUSBAR-1.6.0.md l.3701), and a module its parent declares under construction: tests/test_seal_is_dev_only.rs refuses every non-dev edge that enables the feature. The scan skips such a module's files; qa/contract-stateless.toml strikes the three testkit warn_capture rows (OnceLock, GATE, ONCE) that were never shipped state. RED (selftest): the same planted static in a module declared with no gate, or behind another feature, is RED naming it; behind the test-seal gate it is green.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CONTRACT-ABI lane, item 3 (contract statics, part 3). STACKED on #996, which is stacked on #994, because all three strike adjacent rows of
qa/contract-stateless.toml. It stays DRAFT until #996 lands (rule 19).Coordinator ruling 2026-10-14 (ruling 1, option (a)): test-seal-gated modules count as test code in contract-stateless, because
test_seal_is_dev_only.rsproves it by construction. Add a RED that the same static outside test-seal still fails the gate.THE DESIGN A.8 (
docs/design/BUSBAR-1.6.0.mdl.3701):busbar-contracthas nostatic,OnceLock,LazyLockorthread_localoutside tests.testkitis declared atcrates/busbar-contract/src/lib.rs:136as#[cfg(any(test, feature = "test-seal"))] pub mod testkit;, andtests/test_seal_is_dev_only.rsrefuses any non-dev edge that enablestest-seal. Its log double's serialization statics (warn_capture.rsONCE,GATE,OnceLock) are therefore never shipped state. The gate read them as production because it filters#[cfg(test)]scopes only inside a file and never looked at the parent module's declaration.xtask/src/gates/contract_stateless.rs:test_seal_modulesreads every contract file for amoddeclared directly under#[cfg(any(test, feature = "test-seal"))]or#[cfg(feature = "test-seal")], and the scan skips those modules' files (<m>.rs,<m>/…). Nothing else changes: any other gate, or none, is still scanned.qa/contract-stateless.tomlstrikes the threetestkit/warn_capture.rsrows: 40 → 37 on top of contract: delete the write-only scope-kind registry static (stacked on #994) #996.RED (selftest), with the same planted static
PLANTED_SEAL_STATEin a plantedsrc/planted_seal/mod.rs:lib.rsbehind#[cfg(any(test, feature = "test-seal"))]: GREEN;#[cfg(feature = "planted-feature")]: RED, naming the file and the static.Shared file: #944 (this lane) also edits
contract_stateless.rsin disjoint hunks (a const afterCONTRACT_SRC, and selftest cases after the#[cfg(test)]green case).merge-treeis clean against #944 and #942.No dependency change.