Skip to content

Declares::from_declares_json: the one reader of a declares document; needs checked and left out of the manifest - #550

Closed
MattJackson wants to merge 9 commits into
predevfrom
p4-declares-needs
Closed

MattJackson wants to merge 9 commits into
predevfrom
p4-declares-needs

Conversation

@MattJackson

@MattJackson MattJackson commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

ARCHITECT ruling (b), 2026-10-07, extended the same day. declares.json stays the conformance file: the suite test the_declared_needs_are_the_statements and the busbar-release render keep reading needs, and the declares section never carries it, because needs belong to the Statement.

Defect. Two readers parsed a plugin's declares.json straight into sign::Declares, which has deny_unknown_fields. Both refused needs, so the roster repos that state it (store-mysql, store-postgres and store-valkey with tcp; secret-vault and export-webhook with http) broke in two places:

  • busbar-plugin-pack --declares-file refused to pack them.
  • The root's linked_exports refused at boot. It read a linked sink's DECLARES, and ORACLE-BURN measured this on a build linking export-webhook dev. door_breaker read a linked plane door's row the same way.

Change.

  • New Declares::from_declares_json(&[u8]) in sign.rs, beside Declares. It checks needs is a list of DECLARES_NEED_SCHEMES (tcp, http, https), removes it, and reads the rest with deny_unknown_fields kept.
  • Every reader of a declares document now goes through it: pack's read_declares, linked_exports, door_breaker, and the test sites that read a linked sink's DECLARES.
  • A signed manifest's declares is not a declares document, so it still refuses needs.
  • No plugin repo changes are needed.

RED tests. Each fails without the change.

  • pack_cli_leaves_the_declares_needs_out_of_the_manifest:
    • a file with needs packs to a manifest with no needs;
    • a malformed needs is refused: not a list, a non-string, or gopher;
    • any other unknown key is still refused;
    • no refusal writes a tarball.
  • declares_reader_tests:
    • the same three cases at the reader itself, plus non-JSON input;
    • a signed manifest stating needs is refused;
    • a scan of crates/ and xtask/ fails on any serde_json::from_* that reads declares bytes into Declares outside the one reader. It has a RED arm over its own patterns and was red on linked.rs and export_conformance_tests before this change.
  • a_linked_export_declares_stating_needs_boots: every real linked export door, restated with needs, reads to the same manifest section and links into the registry. A malformed needs refuses the rows, naming the plugin.
  • a_plane_declares_stating_needs_still_reads_its_breaker_fact: the decisions door's row reads its breaker fact beside needs. A malformed needs is refused, naming the row.

Proof.

  • busbar-plugin-loader (--features pack) and busbar tests, unfiltered: all green.
  • clippy with -D warnings and fmt --check pass.
  • Gate secret-hygiene is green.
  • Gates kind-isolation and kind-isolation-ship give the same rows as predev's own base. Both are red there (deps, test-deps, faces, testkit, legacy-drain, control-path), and none of those findings involve the files changed here.

… manifest (ARCHITECT ruling (b))

A networked plugin's declares.json states `needs` (the transport schemes its Statement's needs
name) for the conformance suite (the_declared_needs_are_the_statements) and the fleet render (its
conformance host). pack's --declares-file parsed the whole file into sign::Declares, whose
deny_unknown_fields refused `needs`, so store-mysql, store-postgres, store-valkey, secret-vault and
export-webhook could not pack. The needs belong to the Statement, so the manifest never carries
them: read_declares parses to a Value, checks `needs` is a list of known schemes (tcp, http,
https: the schemes a transport framer serves), removes it, and deserializes the rest into
Declares with deny_unknown_fields kept.

RED (pack_tests pack_cli_leaves_the_declares_needs_out_of_the_manifest): a declares file with
`needs` packs to a manifest whose declares has no needs; a `needs` that is not a list, holds a
non-string, or names a scheme no framer serves is refused; any other unknown key beside a
well-formed `needs` is still refused; each refusal writes no tarball. The test fails without the
change.
@MattJackson
MattJackson enabled auto-merge October 7, 2026 11:04
@MattJackson
MattJackson disabled auto-merge October 7, 2026 11:14
…cument; the root's linked rows read through it (ARCHITECT ruling (b), extended)

ORACLE-BURN measured a second refusal pack's fix did not cover: the root's linked_exports read a
linked export crate's DECLARES (include_str! of its declares.json) straight into sign::Declares,
so a binary linking export-webhook dev exited at boot on `needs`. door_breaker read a linked plane
door's linked-declares row the same way.

Declares::from_declares_json(&[u8]) (sign.rs, beside Declares) checks `needs` is a list of
DECLARES_NEED_SCHEMES (tcp, http, https), removes it, and reads the rest with deny_unknown_fields
kept. Every reader of a declares document uses it: pack's read_declares, linked_exports,
door_breaker, and the tests that read a linked sink's DECLARES. A signed manifest's `declares` is
not a declares document and still refuses `needs`.

Tests:
- declares_reader_tests: the reader drops a well-formed `needs` and refuses a malformed one (not a
  list, a non-string, a scheme no framer serves), any other unknown key beside it, and non-JSON; a
  signed manifest whose declares states `needs` is refused; and a scan of crates/ and xtask/
  refuses any serde_json::from_* that deserializes declares bytes into Declares outside the one
  reader (RED arm over the scanner's own forms; red on linked.rs and export_conformance_tests
  before this change).
- root linked a_linked_export_declares_stating_needs_boots: every real linked export door
  restated with `needs` reads to the same manifest section and links into the registry; a
  malformed `needs` refuses the rows by name. Red before this change.
- root serve a_plane_declares_stating_needs_still_reads_its_breaker_fact: the decisions door's row
  with `needs` beside its breaker fact reads the fact; a malformed `needs` is refused by row.
  Red before this change.
@MattJackson MattJackson changed the title pack: a declares file's needs is checked and left out of the signed manifest Declares::from_declares_json: the one reader of a declares document; needs checked and left out of the manifest Oct 7, 2026
@MattJackson
MattJackson enabled auto-merge October 7, 2026 11:25
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

promote into predev: DENY @8610e68d4: 0 failing test row(s), 11 DENY row(s)

Merge queue group 4627fbfe8 (first in its group, so this PR's own red): it re-enters only with a new head.

DENY rows (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 39 hit(s) off the [[law0]] ceilings, 6 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 vocabular
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 39 hit(s) off the [[law0]] ceilings, 6 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 vocabular
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
Denied because (2)
  • shard 1/4: gate:kind-isolation row kind-isolation:law0: figure rose 21 -> 39
  • shard 1/4: gate:kind-isolation-ship row kind-isolation:law0: figure rose 21 -> 39

Judged against base e9a1b8fec: 0 new red, 2 worse, 3 standing (excused).

Reused PASS by input key (1, 1 min not re-run)
step key produced by
build:deletion-matrix 5f091001188f6c73 81417a5a5

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

…o the needs-boots test has no row to restate (the hop's gate:test:no-default-features)
@MattJackson
MattJackson disabled auto-merge October 7, 2026 13:30
…(no vacuous pass without the feature) and restates the webhook sink's row, the one whose repo states needs
@MattJackson
MattJackson enabled auto-merge October 8, 2026 01:47
@MattJackson
MattJackson added this pull request to the merge queue Oct 8, 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
@MattJackson
MattJackson added this pull request to the merge queue Oct 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to invalid changes in the merge commit Oct 9, 2026
@MattJackson MattJackson removed the fixing label Oct 9, 2026
@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

Copy link
Copy Markdown
Collaborator Author

Superseded by #737, which carries every commit of this branch plus the fix for its merge-queue DENY (kind-isolation law0 21->39: transport scheme names in neutral crates). Bundle kept: salvage/pr-550.bundle.

@MattJackson
MattJackson deleted the p4-declares-needs branch October 10, 2026 20: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