Skip to content

plane black box: one runner boots the real binary against every linked door's case files - #1024

Merged
MattJackson merged 5 commits into
predevfrom
lane-law0-blackbox
Oct 15, 2026
Merged

MattJackson merged 5 commits into
predevfrom
lane-law0-blackbox

Conversation

@MattJackson

@MattJackson MattJackson commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #1006 (draft until it lands, rule 19).

What

  • build.rs. It reads DEP_<LINKS>_BLACKBOX for every enabled plane door, using the same links name as the cells, so a path dependency and a pinned dependency resolve the same way.
    • It emits DOOR_BLACKBOX: &[(crate, dir)] into door_cells_files.rs.
    • It states BUSBAR_LINKED_AXES as data.
  • tests/plane_blackbox.rs. One test iterates every linked door's directory.
    • For each case it writes the case's files and starts the far ends the case asks for: a scripted JSON-RPC responder, the JWKS issuer over loopback TLS, a signed auth plugin, a signing key.
    • It then boots CARGO_BIN_EXE_busbar, drives it, and holds every answer to the case.
    • The Rust knows JSON, HTTP/1.1 and JSON-RPC 2.0 framing only. It names no plane, dialect or instance (law0 measure of the new files: 0).
  • Rigs reused and shared. tests/common/{credentials,lines,upstream}.rs hold what mcp_stdio_serve.rs and qa_mcp_integrity.rs carried privately; both suites now use them.
  • a2a door. It states blackbox=<crate>/tests/blackbox with one seed case, so the resolution path runs in CI.

Schema blackbox/1 (case file, JSON)

Top-level fields:

  • schema (required), case (required), oracle? (a 1.5.5 golden cell id). The cited cell is COMPARED: its recorded bytes are read from golden/1.5.5/cells/<id with | as __>.json, and the case's last status-stating step is held to them. The status must equal the cell's status. Every stated body or line must match the cell's body.text/body.json and effects.stderr: a _line_eq is a whole line of the record, a _contains is in it, a _lacks is not, and an admin json_eq holds the recorded value. A citation that states no byte is refused. Any difference fails naming the plane, the case and the cell
  • requires?{sections,axes,features}: a build lacking any of these makes the case N/A. Axes are named as the manifest's linked-axes rows name them, e.g. body-ingress.
  • unless?[axis]: a build linking any of these axes makes the case N/A, so the case runs only where the axis is absent.
  • A directory whose cases are all N/A fails.
  • files?{name: text}, vars?{NAME: value}, unset?[NAME]
  • credentials?{auth_plugin?{module,alias,first_party?}, issuer?, signing_key?}
  • upstream?{methods:{m: {result}|{echo:{from,into,base?,format?}}}}
  • steps[]

Steps:

  • validate{args?,exit?,stdout_contains?,stderr_contains?,output_contains?,output_lacks?,stdout_line_eq?,stderr_line_eq?}
  • boot{args?,expect: listening|exit,exit? (implies expect: exit; refused beside expect: listening),listening?[data|admin],within_secs?,exit?,output_contains?,output_lacks?}
  • session{flag,credential_var?,credential?,expect: served|refused,script?[send|recv{method?,pointer_eq?,has?,contains?}|repeat{max,send,elicitation?{method,message_pointer?,message?,answer},served_has?,served_contains?,refused_contains?,min_served?,elicitations_equal_served?}|eof{exit?,within_secs?}],no_frames?,output_contains?,output_lacks?}
  • call{port?,method?,path,headers?,bearer?,body?,status?,body_contains?,body_lacks?}. Every JSON-RPC reply, whether the body or an event-stream data: line, must carry its request's id; this is always on, with no opt-out. The same check runs on every repeat round.
  • admin{method?,path,body?,status?,json_eq?}
  • mint{path?,body?,bind_audience?}
  • upstream_set{method,result|echo}
  • upstream_counts{since: last|start,counts:{m: "+N"|"=N"|">0"}}

Placeholders:

  • {dir}, {plugins_dir}, {data_port}, {admin_port}, {admin_token}, {upstream_url}
  • {token:<aud>}, {issuer_settings:<indent>:<aud>}
  • {signing_key_file}, {signing_key_hex}, {minted}
  • {i}, inside repeat.send only

An unknown field, step or placeholder is refused.

REDs

  • a_malformed_case_is_refused_naming_the_plane_and_the_case: unknown field, unknown step, missing name, wrong schema, unknown step field.
  • a_mismatch_fails_naming_the_plane_and_the_case: --version expected nonzero fails at step 0 (validate); the exit-0 control runs clean.
  • a_door_stating_a_black_box_directory_with_no_cases_fails.
  • the_scripted_far_end_answers_what_the_case_states_and_counts_it.
  • a_boot_step_is_held_to_the_exit_it_states.
  • unless_runs_a_case_only_where_the_axis_is_absent.
  • a_reply_under_a_foreign_id_fails_the_call.
  • a_cited_cell_whose_bytes_differ_fails_naming_the_plane_the_case_and_the_cell: a wrong line, a wrong status, and no byte stated all fail; the cell's own bytes hold (the control). The a2a seed case cites cli|--version.

Ledger

busbar auth 49 -> 47, plane 772 -> 771, transport 200 -> 195. The moved rigs no longer name instances; the new files measure 0.

…d door's case files

A plane door crate states its black-box cases beside its root cells under the same `links`
name (`cargo::metadata=blackbox=<dir>`); the root's build.rs resolves them identically for a
path dependency and a pinned one (DOOR_BLACKBOX) and states BUSBAR_LINKED_AXES as data.

tests/plane_blackbox.rs reads every case (schema blackbox/1: requires, files, vars, unset,
credentials, a scripted JSON-RPC far end, steps validate | boot | session | call | admin |
mint | upstream_set | upstream_counts), boots CARGO_BIN_EXE_busbar and holds every answer to
the case. The Rust knows JSON, HTTP/1.1 and JSON-RPC 2.0 framing only; it names no plane,
dialect or instance.

The rigs the line-served and integrity suites carried move to tests/common (credentials,
lines, upstream) and both suites use them.

REDs: a malformed case is refused naming the plane crate and the case file; a mismatch fails
naming the plane crate, the case and the step; a black-box directory with no case fails; the
far end answers what the case states and counts it.

The a2a door states its directory with one seed case. Ledger: busbar auth 49 -> 47, plane
772 -> 771, transport 200 -> 195.
A case's oracle cell is read from the 1.5.5 golden and its last status-stating step is held
to it: the stated status to the cell's status, every stated body or line to the cell's
recorded body and stderr (line_eq a whole line, contains in it, lacks not in it, admin json_eq
the recorded value). A citation stating no byte is refused. Any difference fails naming the
plane crate, the case and the cell.

RED: a_cited_cell_whose_bytes_differ_fails_naming_the_plane_the_case_and_the_cell (a wrong
line, a wrong status, no byte stated; the cell's own bytes hold as the control). The a2a seed
case cites cli|--version.
…axis is absent, every reply answers its own request

- boot: `exit` is accepted (a boot that states it expects to exit); `exit` beside
  `expect: listening` is refused.
- unless: [<axis>] (top level): a build linking any of them does not apply to the case.
  Axes are named as the manifest's linked-axes rows name them (body-ingress), for
  requires.axes too, matched against BUSBAR_LINKED_AXES' cfgs.
- reply ids: a call's JSON-RPC replies (the body, or each event-stream data line) and every
  repeat round's reply carry the request's id; on always, no opt-out.

REDs: a_boot_step_is_held_to_the_exit_it_states,
unless_runs_a_case_only_where_the_axis_is_absent, a_reply_under_a_foreign_id_fails_the_call.
Law 7 (core loads a plugin iff its configuration section is present), for the agent plane, as
two black-box cases in its own crate: a 1.5.5 config leaves every agent admin path answering as
an unmounted path, the overlay list without the agent section and the agent door to the
catch-all; the same config with an `agents:` section serves the admin paths, lists the section
and answers the door as a plane door (401, RFC 6750). These are the agent rows of the root's
law7 fixtures (law7_plane_sections.yaml, law7_plane_doors.txt), which go once every linked
door states its own cases.
…redential's row (they boot its identity provider), as the tool plane's do
Base automatically changed from lane-law0-door-cells to predev October 15, 2026 13:54
@MattJackson
MattJackson merged commit 240a6bf into predev Oct 15, 2026
@MattJackson
MattJackson deleted the lane-law0-blackbox branch October 15, 2026 13:54
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