Skip to content

docs(container): state the positive-control leak rate as the measured interval, not a constant - #211

Merged
github-actions[bot] merged 2 commits into
mainfrom
fix/stream-load-leak-rate-interval
Oct 8, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
fix/stream-load-leak-rate-interval

Conversation

@aitrawog

@aitrawog aitrawog commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #41 — a comment-accuracy fix, not a behaviour fix, in
container/stream_load_cleanup_test.go.

The comment guarding this battery recorded its positive control as a constant — "leaks only ~1
run in 5"
— and derived "a 3-run battery misses a real leak 51% of the time" from it. That rate does
not reproduce: re-measured on three trees the control leaked 18/25 (≈0.72) — 5/5 on b39ae868,
7/10 on 40a4541c, 6/10 on f1c08774 — and the 95% Clopper-Pearson interval for the recorded 1-in-5
([0.005, 0.72]) meets that only at its extreme edge. A reader who perturbs this test therefore gets
numbers that contradict the note, and the natural next step is to distrust the whole note — including
the part that matters.

So this keeps the fact the comment exists to preserve and drops what does not hold:

  • kept — the intermittency (invisible in the source, and exactly what makes an underpowered
    battery look clean), the load-bearing group kill ("removing it alone reintroduces the leak"), and
    >=10, which survives every measurement taken;
  • dropped — the constant rate and the 51% derived from it. That percentage was the reason the old
    text called a 3-run battery "close to useless", and it is the part the numbers do not support: at the
    measured low end a 3-run battery misses a real leak ~6% of the time (0.4³) and at the pooled rate
    ~2% (0.28³). The battery still has to be long — the low end governs and the leak is
    intermittent, so a clean 0,0,0 is weak evidence — but the claim now rests on the measured range and
    shows its arithmetic instead of inheriting a number from the constant that did not reproduce;
  • added — the observed range taken from the cited table itself (0.6 to 1.0: 5/5, 7/10, 6/10,
    pooled 18/25 ≈ 0.72), and the fact that the once-recorded ~1 run in 5 is the one value it does not
    take. The driver of that spread is not established, and rather than answer an anomaly with
    "environmental / probably" (B14), it is routed to a named row: spec#212, which owns measuring it
    — quiet vs loaded on one tree first, then core count and scheduler — and will replace the interval with
    a cause plus its measured range.

How tested

The changed artifact is prose in a _test.go file, so the proof is (a) the module's own committed CI
still passing on this head and (b) the claim's provenance being the measurement rather than a constant.

Module gate on this head — gofmt, go vet, go test ./... and golangci-lint v2.13.2, i.e. this
repo's own committed standards (prose-only change, so no runtime bed applies):

$ cd .worktrees/loader-paths/spec
$ test -z "$(gofmt -l .)"; echo "gofmt exit=$?"
gofmt exit=0
$ go vet ./container/; echo "vet exit=$?"
vet exit=0
$ go test ./... > /tmp/spec41-test.log 2>&1; echo "exit=$?"; grep -c 'FAIL' /tmp/spec41-test.log
exit=0
0
$ go test ./container/
ok  	github.com/opencharly/spec/container	1.632s
$ go run github.com/golangci/golangci-lint/v2/cmd/[email protected] run ./container/
0 issues.

Claim-keyed sweep (R5/Rule 11) — the retired constant on origin/main, then on this head, where the
only surviving mention is the provenance note that says it did NOT reproduce:

$ git -C spec grep -n '1 run in 5\|1-in-5\|51%' origin/main -- '*.go' '*.md'
container/stream_load_cleanup_test.go:116:	// reap removed in transfer.go AND the group kill removed below — leaks only ~1 run in 5,
container/stream_load_cleanup_test.go:117:	// so a 3-run battery misses a real leak 51% of the time and a clean 0,0,0 means almost
container/stream_load_cleanup_test.go:118:	// nothing. Use >=10 (0/12 clean here against that 1-in-5 control). The kill is
$ git grep -n '1 run in 5\|51%' -- '*.go' '*.md'
container/stream_load_cleanup_test.go:118:	// spans roughly 0.6 to 1.0, and the "~1 run in 5" once recorded here is the one value it

Diff for this head:

$ git diff --stat origin/main...HEAD
 container/stream_load_cleanup_test.go | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

Head 3279b7bdb5b97228c51dd894c2e0efaf4072ab0d

What I did NOT do, stated plainly: I did not re-run the perturbation myself. The rate table above is
the issue's own measurement, attributed and not re-derived; what I executed here is the module gate and
the sweep. That is why this lands at documentation reviewed rather than a runtime tier.

Rulebook compliance

  • R0 — /charly-internals:git-workflow loaded before branching and committing (this is a
    commit/PR action), with /charly-internals:strict-policy for R1/R2/R5/RDD, and the spec repo's own
    AGENTS.md read first as Part II rule 4 requires of any subrepo.
  • R1 — the anomaly is the one this issue records: a landed doc-vs-reality divergence (a stated
    constant that does not reproduce). Root-caused before remediation in the issue itself — the mechanism
    is explicitly unidentified, and this change does not invent one: it states the interval and names
    the limit. Nothing is classified as a flake and no warning is parked.
  • R2 — the whole cutover is this one claim: every occurrence of the retired constant in the repo is
    reconciled in the same commit (sweep pasted above), and the surviving mention is deliberate provenance
    rather than a live claim.
  • R3 — one canonical statement of the battery's power lives in this one comment; no second copy is
    introduced and none is left behind.
  • R4 — no sleep, retry, suppression, or shim: this change adds no logic at all and removes a
    derived percentage rather than hiding a weakness behind it.
  • R4a — N/A — no product defect is routed around; the comment is not an instruction a reader must
    execute, and nothing in it tells anyone to run a checkout-relative recipe (the trap that cost two PRs
    a block today, filed as charly#837). The only commands named in this body are the gate and the sweep,
    and every one runs from this repo alone.
  • R5 — the legacy claim is deleted completely, proven by the claim-keyed grep above (3 hits on
    origin/main, 0 live hits on this head).
  • R6 — git status --short is empty after the commit; no force-push, no hook bypass, no push to
    main.
  • R7 — for a prose-only change the falsifiable form of "coverage that fails without the change" is the
    measurement that contradicts the old text, and it is pasted above with its provenance. The changed
    path is executed live by go test ./container/ (the file this comment lives in), which passes.
  • R7a — N/A — no boundary crosses a real external service in this change.
  • R8 — N/A for emitted artifacts (no labels, plans, configs, or generated files are touched); the
    emitted artifact here is the comment a human reads, validated against the measurement it cites.
  • R9 — N/A — no binary is built or deployed by this repo; its artifact is the Go module.
  • R10 — the class is documentation/comment inside a Go module (/charly-check:check
    references/beds-and-r10.md: a plain module with no charly.yml project and no disposable: true
    entity, so no bed can exist here — the schema is not runtime behaviour). The gate for that class is
    this module's own committed standards, green on this head and pasted in full above.
  • Rule 11 (guidance in the same cutover) — the claim this change invalidates is the rate constant and
    the percentage derived from it, and both are corrected where they live. The guidance that was
    missing
    is the part a reader needs and the old text could not give: that the rate is an interval
    and derived from the table's own numbers, that the 51% was wrong for the measured rate, and that the
    driver of the spread is tracked by spec#212 — so the next person to perturb this test neither
    re-derives a wrong constant nor distrusts the note's load-bearing >=10, and the open question has an
    owner rather than an adjective. This PR's
    own prose is held to the same bar: the one place a rate appears, it is attributed and bounded.

Change classification

Documentation — a comment inside one _test.go file: no code, no pins, no scripts, no behavioural
config changed, and the module still builds and tests green. That is exactly the
documentation reviewed tier, whose proof is that every non-runtime standard passed — pasted above
(gofmt, go vet, go test ./... 0 failures, golangci-lint 0 issues) — and a runtime tier would be
forbidden for prose-only work.

Divergence from the issue worth stating: spec#41 says "Not worth a solo PR — fold into the next
change that touches container/"
. I landed it solo because it was assigned as its own row; the issue's
batching preference is recorded here rather than silently overridden, and the reviewer can weigh it.

Agent: loader-paths
Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (documentation reviewed)

… interval, not a constant

#41. The comment guarding this battery recorded the positive control
as "~1 run in 5" and derived a percentage from it. Re-measured on three trees
(18/25 aggregate, 5/5, 7/10, 6/10) the control leaks at ~0.72, and the 95%
Clopper-Pearson interval for the recorded 1-in-5 ([0.005, 0.72]) overlaps only at
its extreme edge — so the recorded figure does not reproduce and a reader who
perturbs this test would get numbers that contradict it, then distrust the whole
note, including the part that matters.

No behaviour changes: the guidance the comment exists to preserve is the
INTERMITTENCY, which is invisible in the source and is exactly what makes an
underpowered battery look clean. So this keeps that, drops the constant and the
derived percentage, and states the interval plus the honest limit of what was
measured — the rate is environment-dependent and the MECHANISM IS UNIDENTIFIED
(scheduling is a plausible guess, not an established cause). `>=10` survives every
measurement taken and stays.

The kill is still recorded as load-bearing: removing it alone reintroduces the leak.

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (documentation reviewed)
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 05405ded14a0ef8be3ae2a32d4eb73d3bb7c2195 (branch: fix/stream-load-leak-rate-interval)

Change class: docs-only — comment-only edit inside container/stream_load_cleanup_test.go (no code lines changed), so the non-runtime standards apply and documentation reviewed is a legal tier.

Blocks

  1. A1 / B5 — the replacement comment states an interval that contradicts the very measurement it cites. container/stream_load_cleanup_test.go:118 now reads "observed between 1-in-5 and 7-in-10", but the body's own provenance (18/25 over three trees, i.e. 5/5, 7/10, 6/10) gives an observed range of 0.60–1.00, pooled mean 18/25 = 0.72. The stated upper bound 7-in-10 = 0.70 is below both the observed maximum (5/5 = 1.00) and the aggregate mean (0.72) — an interval whose top edge sits under the mean is impossible. The stated lower bound 1-in-5 = 0.20 is the exact constant the same sentence says "did not reproduce." So the sentence both includes the non-reproducing value as an observed endpoint and excludes the actually-observed values. This is precisely the class of unverified numeric claim the PR exists to remove; it re-introduces a fresh doc-vs-reality divergence (R1). Fix: state the interval the measurement supports (e.g. observed between ~6-in-10 and 5/5 across three trees, pooled 18/25 ≈ 0.72), or drop the numeric endpoints and keep only the qualitative "intermittent / environment-dependent / mechanism unidentified" statement.

  2. A1 / B5 — the retained "close to useless" claim also rests on the non-reproducing low end. The new text keeps "At the low end a 3-run battery is close to useless" (line 121). A 3-run battery is only "close to useless" at the retired p = 0.2 rate (0.8³ ≈ 0.51); at the observed low end p = 0.6 the miss probability is 0.4³ ≈ 0.06, which is not "close to useless." The body claims the derived percentage was dropped, but its qualitative stand-in survives only under the constant the body says did not reproduce. Fix: either restate this in terms of the measured range, or drop it.

  3. R1 / B14 — banned "environmental" framing used in place of an RCA. Both the comment and the body justify the varying rate as "environment-dependent" and "the MECHANISM IS UNIDENTIFIED (scheduling is a plausible guess, not an established cause)." A wildly varying leak rate for a positive control is a surfaced anomaly; R1 requires a root-cause RCA, and the anti-cheat catalog explicitly forbids answering a surfaced anomaly with "environmental / probably" in place of one. "We don't know and it varies by environment" is not an RCA. Fix: name the specific mechanism (or the specific measured environmental variable that changes the rate), or route the unexplained variance to a NAMED batch/task (B6/R2), rather than parking it as an unidentified mechanism.

(No comment-thread items: the thread is empty, nothing to disposition.)

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

… and route its driver to a named row

spec#211 review, findings 1-3, all arithmetic-checked:

1. The interval contradicted its own provenance. The cited table is 5/5, 7/10, 6/10
   (pooled 18/25 ~= 0.72), so the observed range is 0.6 to 1.0 — while the text said
   "1-in-5 to 7-in-10", whose top edge (0.70) sits under both the maximum (1.00) and
   the mean (0.72), and whose bottom edge (0.20) is exactly the constant the same
   sentence says did not reproduce. The endpoints now come from the table.

2. "Close to useless" survived only under the retired constant: a 3-run battery misses
   a real leak ~51% of the time at p=0.2, but only ~6% at the measured low end (0.4^3)
   and ~2% at the pooled rate (0.28^3). Restated with those numbers, and the formula is
   given so the next reader can check it rather than trust it.

3. "Environment-dependent" plus an unnamed mechanism is banned framing in place of an
   RCA, so the unexplained variance is routed to a NAMED row instead: spec#212, which
   owns measuring the driver (quiet vs loaded on one tree first, then core count and
   scheduler). No mechanism is invented here, and the finding is not deleted.

The meta-lesson is recorded rather than hidden: a PR whose purpose is removing an
unverified numeric claim introduced a fresh one, and it was caught by arithmetic
against provenance rather than by intent.

Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (documentation reviewed)
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Review — PASS

Head SHA: 3279b7bdb5b97228c51dd894c2e0efaf4072ab0d (branch: fix/stream-load-leak-rate-interval)

Security screen: PASS — comment-only edit; no secrets, egress, guardrail weakening, or scope mismatch (T1–T4 clean).
Change class: docs-only (comment-only inside container/stream_load_cleanup_test.go; the +10/-4 hunks touch only // lines — returned := false / t.Cleanup are context).
Checklist: All applicable rules PASS or NA.

  • A1/A3: Body supplies Summary, How-tested with pasted module-gate output, and a rule-by-rule section; ends with the required *Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (documentation reviewed)* footer (preceded by the *Agent:* line). documentation reviewed is the correct ceiling for a comment-only diff.
  • A2/B12: Non-runtime class; the body correctly identifies that no disposable: true bed can exist for a bare module and pastes the module's own standards (gofmt/vet/go test ./... 0 FAIL/lint 0 issues). Tool-limited: I cannot re-run these; the pasted output is internally consistent.
  • R1/B5: Interval claim is now self-consistent with the cited measurement — 5/5, 7/10, 6/10 → range 0.6–1.0, pooled 18/25 ≈ 0.72; arithmetic checks: 0.4³ ≈ 6%, 0.28³ ≈ 2%; 1-in-5 (0.2) correctly noted as outside the observed range. Sweep line numbers match the diff hunk (116–118 on origin/main, 118 on this head).
  • R2/B6: The unexplained spread is routed to a named row (spec#212), not a vague "follow-up" — the accepted disposition.
  • R5/B10, R3, R4, R6: Retired constant swept in-commit; single canonical statement; no workaround added; git status clean / no force-push (as stated).
  • B15: Two commits are a change + its review-response correction (will squash); no partial/deferred work inside the comment's own scope.
  • B16 placement: CORRECT — prose in the file that owns it; no core/sdk/candy movement, no alias/import.

Comment disposition:

  • Comment 6055863674 (@github-actions[bot], BLOCK @ 05405ded14a0) — stale-superseded. All three findings were against the pre-correction text: the impossible 1-in-5 … 7-in-10 interval, the retained "close to useless" line, and the "environment-dependent / mechanism unidentified" framing. The current head replaces that text with the 0.6–1.0 interval, drops "close to useless", and routes the driver to the named spec#212 — the prior reviewer's own offered fix. No finding survives against the current diff.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 8, 2026 08:29
@github-actions
github-actions Bot merged commit 8fc56aa into main Oct 8, 2026
2 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 8, 2026
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.

container: the positive-control leak rate in stream_load_cleanup_test.go does not reproduce (~1/5 recorded, 18/25 measured)

1 participant