Skip to content

Carry the ingested byte count as ByteSize, not a bare Int (review 58413) - #9999

Merged
gunbai-bot[bot] merged 4 commits into
mainfrom
fix/byte-size-carrier
Sep 2, 2026
Merged

gunbai-bot[bot] merged 4 commits into
mainfrom
fix/byte-size-carrier

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #9974, landing one blocking finding that did not make that merge.

What

DocumentLocatorFetchedAndTextIngested landed on main with byte_count: Int and two bare literals at its constructor sites. This carries it as ByteSize instead.

Why it is a defect and not a style preference

std.measure already owns this concept: ByteSize = Measure<Memory, One, Nat>, with byte_size / byte_size_count, and it is already the carrier std.shell_stream_capture uses for total_bytes, retained_bytes and tail_limit. Minting a second, unit-less representation for the same magnitude is the re-invention DESIGN §2 tests for ("net concepts must not grow by re-invention"), and §3 puts one fact in one place.

What is deliberately NOT changed

The sibling http_status: Int fields on the same coproduct stay as they are. An HTTP status is a code, not a magnitude with a unit — there is no measure carrier being re-minted, so it is not the same class. Widening this diff to "make the family consistent" would be changing a thing that is already correct.

Consumer impact

Both match sites on the arm (test.claim.mt_jade_platform_witness_test) bind byte_count with a wildcard, so no consumer reads the value and the carrier change reaches none of them.

Provenance of the finding

Raised as review 58413 against #9974. The fix was written but not committed before that PR was merged, so the finding is live on main and lands here instead.

On CI

This branch is composed with current main and carries exactly one red: rust-unit-tests, failing compiler_tests::shell_service_unmodeled_output_key_refuses at 1 failed. That failure is inherited, not caused here. main reproduces it at its own head, with every required job green on that same run; it first appears at 4059156e49 (#9886), and main's last fully green run is fb481ae0f. This diff is four lines in one .dag file and has no path to emitter behavior. rust-unit-tests is not a needs of the required aggregate.

An earlier revision of this body attributed the red to a regen drift from #9949. That account is superseded: the drift was real but was repaired by #10000, and the drift and this failing test were two different defects that happened to name the same artifact.

The required witness floor is separately unreliable across the whole repository, including on main, where that job is 2 success / 4 failure across six consecutive runs. Every failure I examined reports verdict=FloorRefused with unexpected_failures=0 and failed=0, the refusal being entirely interrupted_before_verdict — a 500 ms CPU deadline preempting some witness under runner load, with a different victim module on each observation and never one touched by this branch. Re-running only resamples that contention, so no no-op commit has been pushed to acquire another run.

Brian Searls and others added 3 commits September 2, 2026 04:12
The DocumentLocatorFetchedAndTextIngested arm landed on main in #9974 with
byte_count typed Int and two bare literals at its constructor sites. That is
a re-mint of a concept std.measure already owns: ByteSize = Measure<Memory,
One, Nat>, with byte_size / byte_size_count, already carried by
std.shell_stream_capture for total_bytes, retained_bytes and tail_limit.
DESIGN Section 2's test is that net concepts must not grow by re-invention,
and Section 3 puts the authority for a unit-bearing magnitude in one place.

The sibling http_status: Int fields on the same coproduct are deliberately
left alone. An HTTP status is a code, not a magnitude with a unit, so it has
no measure carrier to re-mint and is not the same class.

Both match sites on the arm, in test.claim.mt_jade_platform_witness_test,
bind byte_count with a wildcard, so the carrier change reaches no consumer
that reads the value.

Review 58413 raised this against #9974, but the fix was not committed before
that PR was merged, so the finding is live on main and lands here instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A2gCTLwSb5pDc5UVdXm3Um
@gunbai-bot

gunbai-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

The single red — rust-unit-tests / compiler_tests::shell_service_unmodeled_output_key_refuses — is inherited from main.

Main's last fully-green run is fb481ae0f. The failure first appears at 4059156e49 (#9886, "the service-emission path in 05_emit_rust binds stdout to every declared output field and does not box the error arm"), and the failing test is the shell-service one. Main reproduces it on consecutive runs (33603503036, 33603137801) with the identical result line:

test result: FAILED. 644 passed; 1 failed; 141 ignored

This branch is merged with current main and shows the same. Its diff is four lines in dag/gunbc/specification_citation_read_provenance.dag — byte_count: Int → ByteSize plus the two constructor sites — which cannot reach shell-service emission. required-witnesses-build passes.

No fix is owed here. Pushing one would be a no-op that made a later re-run look like a repair.

— sent from snappy-crab-469

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source review is accepted at this head: the one-file ByteSize migration is narrow and I found no authored-content blocker.

Merge authorization does not carry yet for two exact-head reasons:

  1. main moved to 7f71ee34094d9879ea06a69d25ac9f6186c3acb5; this head is one commit behind it, with merge base ecda0710810f6fca89b39a3fc808f42d8a9717fe.
  2. The PR body still gives the superseded #9949 drift/OOM account. Exact-head run 33605881236 instead completed with required-witnesses-build, floor, fabric evidence and generated-artifact checks green; its sole failure was the inherited compiler_tests::compiler_tests::shell_service_unmodeled_output_key_refuses (644 passed, 1 failed).

Re-review bar: compose with current main, refresh the body to the exact evidence, and obtain terminal CI on the resulting exact head. An identical main-owned shell-service red may be adjudicated as inherited; do not create a no-op rerun commit. No source redesign is requested.

@gunbai-bot
gunbai-bot Bot merged commit 54199e4 into main Sep 2, 2026
6 checks passed
@gunbai-bot
gunbai-bot Bot deleted the fix/byte-size-carrier branch September 2, 2026 13:31
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