Repository navigation
row 155: the usage-tap fault latch leaves the contract; the door returns the fault beside its units and the kernel counts it - #1030
Merged
Conversation
… beside its units and the kernel counts it
The codec's USAGE_TAP_FAULT_REPORTER and USAGE_TAP_FAULT_LATCH statics, their install and report
ports, and the hot vtable's tap_fault_latch service are gone. OperationHandler::extract_usage returns
the fault (UsageTapFault: decode, bad_json, unknown_protocol) as data; the llm door carries it on
OnPieceOut::tap_fault (laid in the padding after fault, pre-tag v1, size unchanged), once per answer;
the kernel's route driver hands it to the steps, and the root counts it on
busbar_billing_tap_decode_fail_total{protocol,reason} under the unit's dialect and warns once per
(protocol, reason).
qa/contract-stateless.toml 44 -> 39 rows (codec.rs USAGE_TAP_FAULT_LATCH, USAGE_TAP_FAULT_REPORTER;
services.rs KEPT, FILLING, once-cell OnceLock). qa/abi-freeze.toml hot 6224 -> 6100.
This was referenced Oct 14, 2026
Merged
…he kernel's count too The default build serves the llm plane through busbar-llm's engine, which drives the plane's Relay itself: its stream end now counts end.tap_fault through busbar_kernel::handlers::usage_tap_fault under the relay's ingress dialect, the same increment the contract latch made before. The import rides the engine's existing busbar_kernel::handlers line (ports-only count unchanged).
…T_NONE by path; the kernel test sits mid-file)
This was referenced Oct 14, 2026
Closed
…ther value as reason=unknown, and a door's fault reaches the kernel counter (RED) Coordinator conditions on the #1030 seam: OnPieceOut::tap_fault is 0 = none plus the named reasons; check_on_piece no longer refuses a value past the vocabulary (only a fault on a non-READY answer), and UsageTapFault::reason_of reads any other value as reason="unknown", counted and warned once, never ignored and never read as none. RED: plane_driver_cases' a_usage_tap_fault_the_door_returns_ reaches_the_kernel_counter drives the kernel double and the linked and dropped test plane through the one loop: a door answering a bad_json fault, and one answering an unknown byte, each reach busbar_billing_tap_decode_fail_total once per unit under their reason.
…hrough busbar_kernel::handlers::usage_tap_fault, the same kernel counter path; merged origin/predev
…t (the call names it by path); merged origin/predev
MattJackson
added a commit
that referenced
this pull request
Oct 14, 2026
qa/abi-freeze.toml conflicted on the abi/hot row: base 6224, predev 6100 (-124, its own hot drains: services.rs, host.rs and their tests), this branch 5965 (-259, the shapes moved to abi/shared.rs). The two drains touch different files, so both deltas apply: 6100 + 5965 - 6224 = 5841. The merged tree measures that exactly (every line of every file under abi/hot, counted by hand, since xtask is not run on the laptop). The cold row is unchanged at 272: neither side touched it. The decl.rs stub waivers stay as #898 re-keyed them: predev did not touch decl.rs, so those lines did not move.
MattJackson
added a commit
that referenced
this pull request
Oct 14, 2026
…: both sides' hunks kept - crates/busbar-contract/src/abi/plane/check.rs: the import list carries #787's MAX_METRIC_LANES, ROUTE_CARRIES_OWN_TOKEN, ROUTE_SCOPE_LOCAL and TAIL_REFUSED_PIECE with predev's TAP_FAULT_NONE. - crates/busbar-kernel/src/plane_driver/route.rs: the Answer copy carries #787's metric_pool, metric_lane and wait_member with predev's tap_fault (OnPieceOut holds all four: tap_fault in the old padding byte, the spans appended; the layout golden and header agree at 181/182 and 216..240). - crates/busbar-kernel/tests/common/mod.rs: TestUnits keeps #787's `resolved` and predev's `tap_faults`; its one DriverSteps impl answers both `resolved` and `usage_tap_fault`. Stale-copy check over every file either side changed since 1d111f2: a file only one side changed is that side's copy exactly, and no file both changed fell back to the base or to one side alone.
MattJackson
added a commit
that referenced
this pull request
Oct 15, 2026
- busbar-plane-llm tests: WholeCtx and ReplyCtx initializers state translate_cap (the default cap, as the in-crate tests already do), the reply rig's Piece copy carries tap_fault, and the dialect's auth-failure status is already a u16 (no as_u16) (#1030/#1031 against the rehomed exchange tests). - busbar build.rs: a test-linked door row's module is the one its plane-door row names in linked-entry (busbar_plane_a2a::agent_door, busbar_plane_mcp::plane_door), not an assumed <crate>::plane_door (E0433 in out/test_linked.rs after FLIP-A2A). - root serve_door_far: the far end's conn::Piece states declared_len (#1032). - root serve_tests session_door: DoorReach takes its secret seam as a shared Arc (#787's per-hop credential re-resolution).
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.
Row 155 (lane-p3-llm), coordinator/contract-ABI ruling. busbar-contract is the ABI's home of shapes and holds no state (BUSBAR-1.6.0.md Part 4; spec l.3701: "Services are reached only through the host tables handed at
open"; l.4589: nostatic/OnceLockin the contract). This PR removes the usage-tap fault latch fromcrates/busbar-contract/src/codec.rs: USAGE_TAP_FAULT_REPORTER and USAGE_TAP_FAULT_LATCH.Base: predev. This PR does not need #1028's
CodecHostthreading. It does rewrite theOperationHandler::extract_usagesignature hunk that draft #1028 also edits (#1028 addshost). Rule 23 applies because #1028 is a draft: whichever of the two lands second adds the other's change to the signature.The seam (ruling: counted kernel-side from the door's return)
install_usage_tap_fault_reporter,install_usage_tap_fault_latch,report_usage_tap_decode_failure,usage_tap_fault_should_warnand both fn-pointer types.codec::UsageTapFault(Decode/BadJson/UnknownProtocol, each with itsreason()label) is the fault as data.OperationHandler::extract_usagenow returnsResult<Option<TokenUsage>, UsageTapFault>. The default and the chat cell return the fault and report nothing.OnPieceOut::tap_fault: u8(TAP_FAULT_NONE/DECODE/BAD_JSON/UNKNOWN_PROTOCOL), next to the units the answer reports.fault, the wayfaultitself was laid afterneed(pre-tag v1). Size stays 216. Only_fault_reservedmoves (181 to 182,[u8;3]to[u8;2]).check_on_piecerefuses a fault only on a non-READY answer. The kernel reads any other value asreason="unknown"(UsageTapFault::reason_of): counted and warned once, never ignored and never read as none.check_on_pieceaccepts only a known code, and only on a READY answer. The layout golden and the C header are updated by hand, exactly as the generator renders them.Pieceand the door'sAnswer.deliverwrites it withmem::take, like the breaker reading, so it goes out on ONE window of the answer however many windows the reply takes.Relayitself, so its stream end handsend.tap_faulttobusbar_kernel::handlers::usage_tap_faultunder the relay's ingress dialect. The import rides the engine's existingbusbar_kernel::handlersline, so the ports-only count is unchanged.tap_faultoff each READY answer and calls the steps' newusage_tap_fault(ctx, dialect, reason)(DriverSteps/AttemptSteps). The root'sDoorStepsmaps the dialect index to its name and callsbusbar_kernel::handlers::usage_tap_fault(protocol, reason).busbar_billing_tap_decode_fail_total{protocol,reason}increment, one per fault, and uses the same process-wide warn-once set (usage_tap_decode_fail_should_warn). The route tests also pin an unknown byte read asunknown.tap_fault_latchslot stays in the layout but is retired.SERVICESno longer serves it,armno longer installs it, and theREASON_CAP/keptinterning that existed only for it is deleted.Bytes and counts unchanged
read_response, the cut-short reported usage, or the floor.USAGE_TAP_DECODE_FAILED, withprotocolandreason). The codec's own coded line (USAGE_TAP_BAD_JSON/UNKNOWN_PROTOCOL/DECODE_FAILED) now logs per request at debug. The diagnostic catalog is untouched.RED
codec::UsageTapFault'scompile_faildoctests:report_usage_tap_decode_failure(..)andusage_tap_fault_should_warn(..)no longer exist, so the contract holds no such port or static.crates/busbar-plane-llm/tests/conformance.rs::a_usage_tap_fault_rides_one_window_of_the_doors_answer: the linked AND the dropped-in door relay a non-JSON same-dialect 2xx through a 16-byte reply window. Exactly ONE window carriestap_fault=TAP_FAULT_BAD_JSON, so the kernel, which counts each answer's fault, counts it once. The transcript line now printstap_fault=.busbar-kernel/tests/support/plane_driver_cases.rs::a_usage_tap_fault_the_door_returns_reaches_the_kernel_counter. It drives the kernel double and the LINKED and DROPPED test plane through the one loop. A door answering abad_jsonfault, and one answering a byte outside the vocabulary, each reachbusbar_billing_tap_decode_fail_totalonce per unit, underbad_jsonandunknown. An answer carrying none counts none.busbar-kernel/src/plane_driver/tests/route_tests.rs::an_answers_usage_tap_fault_reads_as_the_reason_the_kernel_countsandproto/tests/installed_tests.rs::a_usage_tap_fault_counts_one_increment_under_its_reason: one fault is one increment, under its reason, warned once.abi/tests/plane_check_tests.rs::a_usage_tap_fault_rides_only_a_ready_answer: a fault on a non-READY answer is refused, and a code past the vocabulary is admitted (counted as unknown).codec/tests/usage_tap_count_tests.rs: each tap path returns its own fault. The test host arms no latch.contract-statelessgate: a static put back is a NEW finding.Ledger (before → after)
qa/contract-stateless.toml: 44 → 39 rows. Struck:codec.rsUSAGE_TAP_FAULT_LATCH and USAGE_TAP_FAULT_REPORTERabi/hot/services.rsKEPT and FILLING (the latch's reason interner)abi/hot/services.rsOnceLock (KEPT was its only one)OnceLockrow stays: TRANSLATE_CAP_READER (its own PR), ENTROPY_SOURCE and WALL_CLOCK (row 155: the codec's entropy and wall clock leave the contract; a codec is handed a CodecHost (stacked on #974) #1028) still hold it.qa/abi-freeze.toml:crates/busbar-contract/src/abi/hot6224 → 6100 lines. The latch slot's host and plane halves and their test are deleted.Overlap (rule 20)
extract_usagehunk is the same as draft row 155: the codec's entropy and wall clock leave the contract; a codec is handed a CodecHost (stacked on #974) #1028's (same lane; rule 23).qa/contract-stateless.tomlhas rows adjacent to contract-stateless: the plugin-logging capture is the one sanctioned per-thread slot; a second stays red #944's. Whoever lands second settles them by hand (rule 13).door_steps.rs), loader: Plugin<K> is !Clone; shared holders hold Arc<Plugin<K>> #986, row 155 B1c-1: the plane states its provider keys as a neutral descriptor in its Statement (dormant seam) #981 (plane_door.rs), layout golden: refuse a re-seed that is not append-only unless named (TODO l.1829-1831) #980, row 155 B2: the protocol seam names no http type; head fields and u16 statuses, the kernel converts at its edges (TODO 34c (a)) #974 (installed.rs), row 155 F25 REHOME (kernel): auth at the served door gate, egress, config, telemetry and plane-driver rows, 35 legacy tests #900 and row 155 (L1#1): the llm door keeps a retried unit for the kernel's next attempt, and ends a final one #890.abi::planeimport, and the end ofroute_tests.rs. They were moved off: the door namesTAP_FAULT_NONEby path, and the kernel test sits mid-file.abi/hotfreeze row (one count line). Whoever lands second settles it by hand (rule 13).Nothing was run locally (cargo fmt only); ModernCI is the proof.