You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 891e892
Browse filesBrowse the repository at this point in the historyBrowse files
merge: bring in main and reconcile the classifier with the #1145 permanence gate
main extracted classifier-hint building into internal/diagnostics/hints,
which already covers the Docker enrichment this branch was adding inline —
so the conflict resolves to main's hints.For call, with DockerArgs added
there because the #1143 git-dependency remediation reads it.
#1155's TestParkableCode_ChildStderrNeverProvesPermanence pinned the OLD
classifications to isolate its permanence gate; this branch fixes those
classifications, so the expected codes move. The gate's invariant is
unchanged and still asserted: two stderr-only rows that still reach a
PERMANENT code are added so it is never left untested.
# Warm the tiktoken vocabulary ONCE, before the parallel test run.
124
+
#
125
+
# tiktoken-go downloads the BPE on first use into a shared temp dir and
126
+
# finishes with an atomic rename. `go test ./...` runs packages in
127
+
# parallel, so several test binaries race to download the same file, and
128
+
# on Windows the loser hits "Access is denied" on the rename and the
129
+
# package fails — observed as TestBaseline_CountToolWithSchemaParity
130
+
# flaking in bench/arms with no code change anywhere near it.
131
+
#
132
+
# Setting TIKTOKEN_CACHE_DIR alone does NOT fix this: it only names a
133
+
# cache, and an empty one still races. Populating it first does, because
134
+
# every later tokenizer construction is a cache hit with no rename.
135
+
- name: Warm the tiktoken vocabulary cache
136
+
run: go run ./bench/cmd/warmtiktoken
137
+
env:
138
+
TIKTOKEN_CACHE_DIR: ${{ runner.temp }}/tiktoken
139
+
123
140
- name: Run unit tests (Windows)
124
141
if: matrix.os == 'windows-latest'
125
142
shell: pwsh
126
143
run: go test -v -race -timeout 10m '-coverprofile=coverage.out' -covermode=atomic '-skip=E2E|Binary|MCPProtocol|TestInfoEndpoint|TestGracefulShutdownNoPanic|TestSocketInfoEndpoint' ./...
144
+
env:
145
+
TIKTOKEN_CACHE_DIR: ${{ runner.temp }}/tiktoken
127
146
128
147
- name: Run unit tests (Unix)
129
148
if: matrix.os != 'windows-latest'
130
149
run: go test -v -race -coverprofile=coverage.out -skip "E2E|Binary|MCPProtocol|TestInfoEndpoint|TestGracefulShutdownNoPanic|TestSocketInfoEndpoint" ./...
-out /tmp/warm # downloads the vocabulary once — needs network
482
+
ls "$TIKTOKEN_CACHE_DIR"# non-empty ⇒ every later run is genuinely offline
483
+
```
484
+
485
+
`TIKTOKEN_CACHE_DIR` only *names* a directory. A first run with the variable set
486
+
and the directory empty still reaches the network, so a machine "configured for
487
+
offline" but never warmed fails at the first token count rather than at
488
+
configuration time — and it fails the same way on an air-gapped reviewer's
489
+
laptop as it does in a network-restricted CI job. Warm it once with network
490
+
access, or restore a known-good copy (which is what `.github/workflows/bench.yml`
491
+
does via its `actions/cache` step).
492
+
493
+
**2. Supply a fleet input. There is no default, and there is no fallback.**
494
+
495
+
A menu cost is a property of the tool definitions the agent was shown. A
496
+
recording carries the *call shape* — sequence, tool mix, call counts — and no
497
+
fleet snapshot whatsoever, so a recording-only invocation has nothing to price:
498
+
499
+
```bash
500
+
go run ./bench/cmd/bench -replay ~/replay-corpus.jsonl -out bench/results
501
+
# bench: replay requires a fleet input as well as a recording: a menu is a
502
+
# property of the tool definitions and the activity export carries no fleet
503
+
# snapshot, so a recording on its own computes nothing — pass a frozen corpus
504
+
# or a live-proxy catalog (this is an error, not a degraded run)
505
+
# exit status 1
506
+
```
507
+
508
+
That is a **hard error, not a degraded run**. The alternative — quietly scoring
509
+
against an empty or assumed fleet — would produce a plausible-looking number
510
+
with no fleet shape behind it, which is exactly the failure every percentage in
511
+
this report carries a `fleet_shape` to prevent. Pass the frozen corpus for a
512
+
reproducible figure, or a live `-proxy` for today's fleet.
513
+
514
+
**3. Run the pinned command, twice.** The deterministic half is byte-identical
515
+
across runs once the wall-clock stamp is removed — the `diff` recipe under
516
+
"Verify determinism" above is the check, and it is what SC-002 means. If two
517
+
runs on the same machine differ by anything other than `generated_at`, stop:
518
+
nothing downstream is worth comparing yet.
519
+
520
+
**4. Read the three honesty marks before quoting anything.** They are fields in
521
+
`report.json`, not prose in this file, because a report travels without its
522
+
README:
523
+
524
+
| Field | Says | If it is missing |
525
+
|-------|------|------------------|
526
+
|`run_status.completeness`|`complete`, or `partial` with a reason and the unmeasured cells named | Undeclared completeness — the run is **not publishable** as a complete comparison (FR-032) |
527
+
|`<block>.inputs.independently_reproducible`| whether an outsider can obtain the inputs at all | Undeclared availability — treated as **not** reproducible, and blocks publication (FR-030) |
528
+
|`<block>.records`| where this block's raw per-run records sit, as a path relative to the run directory | No `records` key at all blocks publication; `retention: not_retained` does not — the figure is real, just no longer traceable to its inputs (FR-029) |
529
+
530
+
`bench.ReportV2.PublicationCheck()` applies all three and returns blockers plus
531
+
caveats. A partial run blocks. An undeclared input blocks. A report in which
532
+
*every* block rests on a private recording blocks — see step 5.
533
+
534
+
**5. Know what you cannot reproduce.** A replay run over someone's own exported
535
+
activity is scored from **private recorded sessions**: the recording is raw user
536
+
traffic, it is never published (FR-006), and no procedure exists that would hand
537
+
it to you. Such a block is marked `independently_reproducible: false` with the
538
+
limitation stated in the document, and it may **never be the sole support for a
539
+
published claim** — a report whose only figures come from one operator's
540
+
recording is a claim nobody outside can check, however honestly each row is
541
+
labelled. Publish it beside a block an outsider *can* reproduce (the committed
542
+
corpora, or a pinned public task suite), and keep the caveat attached.
543
+
544
+
**6. Raw records are run-local and not durable.** They are written under the
545
+
gitignored `bench/results/` tree — the same tree SC-011 forbids committing and
546
+
the same tree a cleanup empties. The report references them by a path relative
547
+
to its own directory, never an absolute one: an absolute path would carry the
548
+
operator's filesystem into a published document and would dangle on every other
549
+
machine. Copy the run directory elsewhere before relying on those records; once
550
+
they are gone the reference degrades to `records not retained` rather than
551
+
pointing at nothing.
552
+
553
+
Each mark is written by the run that produces the block: the replay entry point
554
+
sets `replay.inputs` (`private-recording` for an operator's own export) and
555
+
`replay.records`; the agent loop sets its own pair plus the report-level
556
+
`run_status`, derived from the cells it planned against the cells it actually
557
+
measured. `WriteJSON` re-checks every records reference against the directory it
558
+
is writing into, so a reference cannot be published pointing at a file that is
559
+
already gone.
560
+
468
561
### Before publishing a replay or agent-loop number
469
562
470
563
1. Recompute the achievable ceiling **for each fleet shape**; never carry a
471
564
previous fleet's ceiling forward.
472
565
2. Quote the fleet shape beside every percentage.
473
-
3. Confirm no report is tracked:
566
+
3. Confirm the run is not `partial`, and that no private-recording figure is
567
+
standing alone — `PublicationCheck()` answers both, and returns the caveats
568
+
that must travel with the number even when it publishes.
569
+
4. Confirm no report is tracked:
474
570
```bash
475
571
test -z "$(git ls-files bench/results)"&&echo"clean (SC-011)"
476
572
```
@@ -588,3 +684,17 @@ headline numbers (image drift can change the tool corpus).
588
684
589
685
Methodology questions / disputes: open an issue in `smart-mcp-proxy/mcpproxy-go`
590
686
and tag the maintainers, or comment on the roadmap benchmark ticket (MCP-42).
687
+
688
+
Warm it with the one-line command rather than by hand — the same step CI runs
689
+
before its parallel test sweep:
690
+
691
+
```bash
692
+
export TIKTOKEN_CACHE_DIR="$HOME/.cache/tiktoken"
693
+
go run ./bench/cmd/warmtiktoken
694
+
```
695
+
696
+
Why a dedicated step: `go test ./...` runs packages in parallel, and several
697
+
test binaries race to download the same vocabulary into one cache dir. On
698
+
Windows the loser fails its whole package on the atomic rename — it surfaced as
699
+
`bench/arms` flaking with no code change near it. Naming the cache does not fix
0 commit comments