test: honour test { coverageThreshold } (coverage measurement) #191
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
test { coverageThreshold }is part of theproject.trbvocabulary (Int,0..100, default0) and is read by nobody:torb testmeasures no coverage at all. Split out of #33 (#33), because no design record says what coverage is, how it is measured or how a threshold fails a run.Source
Acceptance criteria
Drafted after the owner decision (see the comments below); the shape depends on q1.
test, or a new COVERAGE.md) before code.torb testfails (exit code, message naming measured and required percentage) when measured coverage is below a non-zerocoverageThreshold; it prints nothing new and fails nothing when the threshold is0.docs/tooling/torb-test.md,docs/tooling/project-trb.mdupdated; skills regenerated.Dependencies
Blocked by the owner decision q1 (comments below).
[loop:torbscript] owner decision: what
test { coverageThreshold }measures and how a run fails below it (split from #33; the result is a public behaviour oftorb test).What is settled. The setting exists:
Int,0..100, default0, a problem outside the range (PROJECT.md); it is computed or literal like any non-static setting;torb testreads it nowhere (torb-test.md, Coverage).torb testruns in the VM by default and natively with--native(devprofile); the VM has a line table of statements for the debugger (DEBUGGER.md).What is not settled (no design record, no CONCEPT entry; nothing in the repo defines "coverage"):
#linemapping back to.trb, which BACKEND 6.3 lists as not done, and GCC/Clang only).src/only, or also tests,std/, dependencies; per workspace member or aggregated.--nativedoes with a non-zero threshold.Options.
torb test. (3) Scope: thesrc/of the package under test; tests,std/and dependencies excluded; a workspace member is measured and checked against its own manifest's threshold. (4) Measured only when the threshold is above 0 (no new flag);torb test --nativewith a non-zero threshold is an error that says coverage is measured in the VM (never silently ignored). (5) Below the threshold the run ends with a non-zero exit code after the normal report and one linecoverage 71% is below the threshold 80%;--report jsoncarries acoverageevent; a per-file table is a later issue.devbinary: matches--nativeruns and real optimized code paths, but needs#linefirst, gcov tooling on the machine, no MSVC, and costs a larger slice.Split after the answer (dependency-linked, label
loop): (i) the measurement in the VM with tests; (ii) threshold check, exit code and report line; (iii) docs. Whether the repository's own manifests ever set a threshold is Torben's call, not loop work.Recommendation. Option A. Say "go A", "go B", "go C" or name the changes.
Question q1 for torben (decision, blocking): What should
test { coverageThreshold }measure, and how does a run fail below it?[loop:torbscript] refine: not ready, split from #33 (#33); nothing in the design records defines coverage (unit, mechanism, scope, failure), so the owner decision above and the question q1 below are filed. Seed impact: none expected. Size once decided: two or three issues (measurement, threshold check, docs). next: waiting (owner decision q1)
panicFramesof a profile block #33panicFramesof a profile block #33[loop:torbscript] owner decision recorded (torben via WhatsApp, 2026-10-08 16:35 Europe/Berlin): "Ja, Zeilenabdeckung bei Tests" (yes, line coverage for tests).
Resolution: option A, line coverage counted in the VM over the package's
src/statement lines (debugger table), measured when the threshold is above 0,--nativewith a threshold is an error, below the threshold the run exits non-zero with one message line. Labelledready.[question-closed] q=q1 reason=answered-elsewhere
[loop:torbscript] claim implement by session:loop-torbscript-20261008 until 2026-10-09T03:04Z
[loop:torbscript] implement: PR #222, CI success, next: review (waiting on the merge gate argus)
This PR is the first slice (the measurement,
Refs #191), since the whole issue does not fit one PR: the threshold check intorb testwould collide withexamples/game-engine/project.trb(coverageThreshold = 80) and the native gate, which needs a decision of its own. Follow-ups: #230 (wire the check intotorb test: message, exit code, JSON event,--nativeerror, the game-engine manifest) and #231 (user docs and skills).Worker usage: one implement subagent, no further workers.
[loop:torbscript] implement: PR 222 (measurement slice) merged by argus. The rest of this issue is split into #230 (wire the check into
torb test) and #231 (docs); this issue closes when both landed. next: waiting (follow-ups #230 and #231)[loop:torbscript] implement: measurement slice landed; the rest is #230 (implementation starts now) and #231. next: waiting (#230, #231) until 2026-10-10T04:00:00Z
[loop:torbscript] close: all slices landed - measurement (earlier), #230 threshold check (PR #265) and #231 docs (PR #267), each merged by argus; main CI green (latest checked on
d87348ed). Parent closed.