Skip to content

plugin-loader conformance suite: Statement-mismatch, wrong-kind (every kind), undeclared-need and cross-instance connection RED arms - #611

Merged
MattJackson merged 27 commits into
predevfrom
p5-suite-red-arms
Oct 12, 2026
Merged

MattJackson merged 27 commits into
predevfrom
p5-suite-red-arms

Conversation

@MattJackson

Copy link
Copy Markdown
Collaborator

What

From the loader-PL1 audit: the published conformance suite lacked the RED arms §2 requires of every plugin. This adds three, and turns the wrong-kind arm (which ran only in the store script) into an arm every kind carries. They live in crates/plugin-loader/src/conformance/red.rs and conformance_suite! emits them for every plugin. Each drives the plugin's own door into the misbehaviour, requires the host to refuse it, and keeps an honest twin that must pass beside it.

test (emitted by conformance_suite!) the misbehaving plugin required refusal honest twin
red_a_statement_other_than_the_stated_one_is_refused the door under a linked row and a signed manifest stating a rendering one byte off; the door restated with another version under its honest row StatementMismatch, linked and dropped in the honest door loads linked and dropped in
red_a_door_asked_for_as_another_kind_is_refused the door asked for as each of the six kinds it is not WrongKind linked, ManifestKind dropped in (before dlopen) loads as its own kind, both ways
red_a_connection_over_an_undeclared_need_is_refused the door's instance (restated with one outbound need, bound over the suite's test table) calling ESTABLISH on its own context for need 1 and for the highest need index, neither ever declared REFUSED, the plugin did not declare this need its declared need 0 opens to a loopback listener
red_another_instances_connection_is_refused a second instance of the door, on the same table, calling WRITE, READ and CLOSE on the first instance's connection each REFUSED, the connection belongs to another plugin instance the owner writes before and after, then closes

The connection arms call the host's connector slots (CONN_SLOTS) on the instance's own context. These are the calls a plugin makes through the tables open hands it, so the arm exercises the host's per-instance identity and need checks exactly as a plugin meets them.

The store script's own refused as another kind step stays as it was (its fold is unchanged).

Loader-side tests (conformance_suite_tests.rs, module red_arms)

  • GREEN: an honest door of two kinds (the plane fixture plane_door_plugin and the hook fixture hook_door) passes all four arms, linked and dropped in.
  • RED: a plugin whose dropped-in library is not its linked door (the plane door shipped with the hook library) fails the Statement arm and the kind arm, on their honest twins.

Neutrality and the kind-isolation matrix

with_a_tcp_need is renamed with_an_outbound_need, and the connection fixture reuses Subject::conns (the suite's own test table) rather than naming the table type again. So this PR adds no kind-isolation matrix hit and removes two: 13919 on base, 13917 here. No plane, dialect or vendor noun was added.

plugin-ci.yml

It is left unchanged. Its suite list names the tests every plugin must RUN green, and plugin repos call the workflow against older pins that lack these four. Every test in the conformance target still has to pass in that step (the cargo test run fails the step on any failure), so the arms bite every plugin whose pin includes them. Adding the four names to the required list is a one-line change once the fleet's pins carry this commit.

Checks (Latchkey, large)

check job result
cargo xtask gate --all --format=tsv, base predev 5e672d125 vs head 91474ad24, tags in the bundle cli-7e34bff7-582c-4129-8ebc-be4d00bc0353 / cli-b63d09e5-c9b2-4786-998e-ffb846eb862c GATE EXIT 1 on both (base carries 12 FAIL rows). 556 judged rows; verdict columns identical (541 PASS / 12 FAIL / 3 EXCUSED); non-PASS rows byte-identical; kind-isolation matrix 13919 -> 13917
fmt; workspace clippy -D warnings; instance-noun-neutrality, kind-isolation, plane-purity, structure-lint selftests cli-f766c2fd-02e8-4053-804c-375d33edc64c all rc 0
loader conformance:: tests (CI=1, the loader's examples built) cli-08289c11-2080-404f-9538-55217414598e 42 passed, 0 failed (the red_arms GREEN and RED among them)
loader lib, all same 641 passed, 2 failed: the two secret both-ways tests that need busbar_secret_env_plugin's cdylib from another crate, which this job does not build (unchanged from base)
busbar-plane-decisions suite, release, BUSBAR_EXPECT_RELEASE=1 same 13/13 ok, the four new arms included; the RED count run rc 101 on the comparator (Linked: step 'facts': 0 crossing(s), pinned 1)

No oracle cell, golden or replay input is touched, so there is no oracle proof to state.

…s every kind's run carries, a Statement other than the stated one, the door asked for as every other kind, a connection over an undeclared need, and another instance's connection

Four arms in conformance/red.rs, emitted by conformance_suite! for every kind:

* red_a_statement_other_than_the_stated_one_is_refused: the door under a row or a signed
  manifest stating a rendering one byte off, and the door restated with another version under its
  honest row, are refused (StatementMismatch), linked and dropped in.
* red_a_door_asked_for_as_another_kind_is_refused: for each of the six kinds the door is not, the
  linked row is refused (WrongKind) and the dropped-in library before dlopen (ManifestKind); the
  store script's own step stays, and every kind now carries the arm.
* red_a_connection_over_an_undeclared_need_is_refused: the door restated with one outbound need,
  bound over the loader's test table; on the instance's own context ESTABLISH of its declared need
  opens to a loopback listener, and of need 1 and the highest index is REFUSED (UndeclaredNeed).
* red_another_instances_connection_is_refused: two instances over one table; the second's WRITE,
  READ and CLOSE of the first's connection are REFUSED (NotOwner), and the owner's still writes.

Each keeps its honest twin beside the refusal. The loader's tests run all four over the plane and
hook fixtures, linked and dropped in, and a plugin whose dropped-in library is not its door fails
the Statement and kind arms.
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

promote into predev: all green @b88ac57d8

Already red on predev, not this PR's: 11
gate row detail
construction one-pick-site 3 production call site(s) of 'pick_among(' (ceiling 2): crates/busbar-kernel-egress/src/walk.rs:298; crates/busbar-llm/src/engine/exhaustion/fallback.rs:120; crates/busbar-llm/src/engine/pipeline.rs:8
kind-isolation kind-isolation:deps 3 finding(s), 93 shipped edge instance(s) over 30 class(es), 93 declaration(s); 56 '[[dep]]' row(s), 0 question(s): unlisted-dep-edge legacy -> plane busbar-llm -> busbar-plane-llm is a shipped edge w
kind-isolation kind-isolation:test-deps 3 finding(s), 35 test edge instance(s) over 21 class(es), 35 declaration(s); 20 '[[dep]]' row(s), 0 question(s): unlisted-dep-edge cleanliness -> legacy busbar-core-admin -> busbar-a2a is a test edge
kind-isolation kind-isolation:law0 9 hit(s) off the [[law0]] ceilings, 5 finding(s) over 14 neutral crate(s): law0-rise busbar × instance:secret 37 hit(s) against a ceiling of 35: this landing grew a neutral crate's instance vocabulary
kind-isolation-ship kind-isolation:deps 10 finding(s) over 93 shipped edge(s): ship-edge kernel -> hooks busbar-kernel -> busbar-hook-ranking is 'not-allowed': the architecture grants no kernel -> hooks edge, and the ship criterion is the a
kind-isolation-ship kind-isolation:test-deps 10 finding(s) over 35 test edge(s): ship-edge cleanliness -> export busbar-core-admin -> busbar-export-prometheus is 'not-allowed': the architecture grants no cleanliness -> export edge, and the ship
kind-isolation-ship kind-isolation:law0 9 hit(s) off the [[law0]] ceilings, 5 finding(s) over 14 neutral crate(s): law0-rise busbar × instance:secret 37 hit(s) against a ceiling of 35: this landing grew a neutral crate's instance vocabulary
kind-isolation-ship kind-isolation:faces 2 finding(s) over 40 crate(s): foreign-entry crates/busbar busbar is kind 'root' and implements 'Transport' 1 time(s) in shipped source — the entry face of kind 'transport'. A trait implementation is
kind-isolation-ship kind-isolation:legacy-drain 3 finding(s): transitional-live qa/kind-isolation.toml 'busbar-a2a -> busbar-core-admin' (legacy drain: the retiring A2A engine's tests drive the admin surface that drained into the cleanliness tier)
ship-ready ship-ready:ship-twin 'kind-isolation-ship' is not green: kind-isolation:deps (a dependency the architecture does not grant is still in the graph); kind-isolation:test-deps (a dependency the architecture does not grant is
structure-lint structure-lint:plane-dup:unledgered 22 finding(s): PLANE-DUPLICATE (module): 'config.rs' — a2a:crates/busbar-a2a/src/a2a/config.rs decisions:crates/busbar-plane-decisions/src/config.rs voice:crates/busbar-voice/src/config.rs (the ledger

tests passed: 20973, failed: 0. Run: https://github.com/GetBusbar/busbar/actions/runs/38221322339 . Artifact verdict-b88ac57d824eaec69f82554d33b59b57e6a18345 (failures.json, junit.xml, raw.log; 90 days).

@MattJackson
MattJackson added this pull request to the merge queue Oct 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 8, 2026
@MattJackson MattJackson added fixing and removed fixing labels Oct 9, 2026
… no "C" literal to plugin-loader (kind-isolation:law0 18 -> 19)

kind-isolation:law0 reads every whole "C" string literal as the secret instance `c`
(busbar-secret-c), and red.rs's two `extern "C" fn` doors raised busbar-plugin-loader ×
instance:secret from its ceiling of 111 to 113 (one new law0-rise finding, in both the gate and
its ship twin). mod.rs's `networked_door` becomes `restated_door::<I>`, one generic entry over
NETWORKED, VERSIONED and CONNECTED (now beside it); red.rs names `restated_door::<1>` and `<2>`.
Measured on Latchkey over this branch merged with predev: law0 18 findings in both gates, as on
predev without the PR.

The root-test-harness row (export_plugin_dropped_in_serves::
validate_reports_a_dropped_in_sinks_settings_errors_in_its_own_words) touches none of this code
(the busbar binary does not compile the conformance module); run on Latchkey over the merged tree
it passes, so the CI red was not caused by this branch.
@MattJackson
MattJackson added this pull request to the merge queue Oct 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 10, 2026
@MattJackson
MattJackson enabled auto-merge October 10, 2026 09:11
@MattJackson
MattJackson disabled auto-merge October 10, 2026 09:12
…via both_ways::example_cdylib instead of a CI-only probe that skipped the Statement and kind arms (no_silent_skip scanner red). Proved by reasoning from the CI failure: Latchkey run budget spent
@MattJackson
MattJackson added this pull request to the merge queue Oct 10, 2026
@MattJackson
MattJackson removed this pull request from the merge queue due to a manual request Oct 10, 2026
@MattJackson
MattJackson added this pull request to the merge queue Oct 10, 2026
The plugin-loader conformance suite's RED arms landed in a new non-test
file (crates/plugin-loader/src/conformance/red.rs), so the crates walk
grew by one: gates::population counts 942 non-test .rs files (was 941)
and the tracing gate's walk counts 972 (was 971). Both floors are
ratchets pinned AT the measured count, and each selftest's plant removes
one file and requires the floor to refuse it; with the floors left one
below the count that plant came back green, failing the blocking-ffi,
response-header, settings-leak (population::FLOOR) and tracing
(SCAN_FLOOR) selftests. Raise population::FLOOR to 942 and tracing's
SCAN_FLOOR to 972, with the re-measure recorded in their notes.

Counts measured with git ls-files over crates/ using each gate's own
exclusions. Not proven on a runner: the Latchkey run budget is spent,
so the PR's CI is the proof. The no-default-features
busbar-core-connector --test universal_needs row reported no panic text
and this change set reaches nothing that test runs (the conformance
module is feature-gated and the test drives the neutral frame door);
left to CI to re-judge.
tracing.rs: take predev's floor_plant (the plant cuts the walk to
SCAN_FLOOR - 1 however far the tree has grown), so the tracing floor
needs no re-pin and stays 971. population::FLOOR keeps its re-pin to 942:
predev did not touch the population plant, and the merged tree holds
942 non-test .rs files under crates/.
@MattJackson MattJackson added fixing and removed fixing labels Oct 11, 2026
…m's whole run

red_statement restated the subject's door into the shared VERSIONED static
and called it later through restated_door::<1>. The loader's two red_arms
tests run at once: red_a_plugin_whose_library_is_not_its_door_fails_the_arms
restates the PLANE door into VERSIONED while the honest test is on its hook
iteration, so load_linked::<Hook> of VERSIONED_DOOR answered WrongKind, not
StatementMismatch (red.rs:111, test:no-default-features).

Restated::hold now locks a per-door mutex, restates, and returns the guard;
red_statement holds VERSIONED, and the two connection arms hold CONNECTED,
until they return. A lock poisoned by a RED twin's expected panic is taken
as is.

Not proven on a runner: the Latchkey run budget is spent; reasoned from the
CI panic text and the parallel test pair, the PR's CI is the proof.
@MattJackson MattJackson added fixing and removed fixing labels Oct 11, 2026
@MattJackson
MattJackson added this pull request to the merge queue Oct 12, 2026
Merged via the queue into predev with commit 1f5571d Oct 12, 2026
11 checks passed
@MattJackson
MattJackson deleted the p5-suite-red-arms branch October 12, 2026 09:13
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