Skip to content

feat(efficacy): time each template read against the first write on its topics - #183

Merged
braboj merged 5 commits into
mainfrom
feat/read-timing
Nov 19, 2026
Merged

braboj merged 5 commits into
mainfrom
feat/read-timing

Conversation

@braboj

@braboj braboj commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

The report now times each template read against the first write on its topics, and lists every skill loaded. Round 6 (C1) can then tell reading on demand from reading up front.

How a template is classed, per trial and task:

Class Meaning
just in time read before the first file on its topics was written
late read only after that write
never its topic was written, it was never read
unused never read, its topic never written
spare read, its topic never written
unmapped no file globs (2 of 13: base-quality, base-review)
  • The topic map is data, fixed before C1's first trial: tests/efficacy/template-topics.json, globs per template id.
  • Reads by a subagent count at the turn that delegated them, shown apart.
  • A change task is timed on its own.
  • No staged task, so no "ahead of its step" class (owner's stand-in).
  • "spare" is a class of its own: a read whose topic is never written is the up-front signal.

Round 5e, build task, post hoc (share of 13 templates):

Arm Read Before first write Just in time Late Never Spare
reference 13.0 13.0 67 % 0 % 0 % 18 %
lazyref 11.4 11.3 61 % 1 % 7 % 11 %
lazyskills 12.3 12.3 64 % 0 % 1 % 18 %

#163: lazyskills loaded 12.3 skills a trial; skills loaded none in 15 trials. skills minus inline: hidden tests −0.000 [−0.002, 0.002], judge security +0.289 [−0.156, 0.889], data protection +0.044 [−0.044, 0.156]. Secondary, no verdict.

File Change
tests/efficacy/report.py shared transcript reader (map_calls, call_effects), read_timing, skill loads, appendix and record tables
tests/efficacy/template-topics.json the topic map
docs/requirements.md, docs/coverage.md, ch. 8.7.6 FR-12-19, FR-12-20
  • report self-test 254/254; 20 mutations, all caught
  • trace.py PASS, pyflakes clean

Refs #168, #163.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DpT5xQh3AgRFs2tJwMT4g3

…its topics

- Fix a topic map, tests/efficacy/template-topics.json: path globs per
  template of the chain; quality and review have none and read unmapped.
- Per trial and per task, class each template's first read against the
  first write on its topics: just in time, late, never, unused, spare,
  unmapped; a subagent's reads kept apart.
- List every skill loaded, with its turn, for each arm with skills, and
  set skills beside inline on the hidden tests and the judge's security
  and data-protection rows, intervals only.
- Per-arm tables in the appendix, per-trial rows in the record, timing in
  the aggregate; no verdict changes.
- Share one transcript reader between the map's use and its timing.
- FR-12-19 and FR-12-20, their coverage, and section 8.7.6.

Refs #168, #163.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DpT5xQh3AgRFs2tJwMT4g3
@braboj

braboj commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Codex round 1:

# Sev Finding Outcome
1 P2 A shell cd before a write resolves the path from the wrong directory By design, simplified: shell commands no longer name a topic's file
2 P2 ../outside/auth.py passes the workspace check and matches a topic Fixing: normalise first, reject a path outside the workspace
3 P2 Redirections without spaces, or before the command, are missed By design, as 1
4 P2 sed -i and curl -o destinations are missed By design, as 1
5 P2 PowerShell -Destination is missed By design, as 1

Rule for 1, 3, 4 and 5: only the agent's file tools name a written file for topic timing. Shell writes are counted per trial and reported as the measure's limitation. The pilot's first-write rule is unchanged.

…kspace

- A shell command's writes are no longer read for the file they name:
  only a file tool's write is placed on a topic.
- Count, per trial and task, the shell calls that wrote before the last
  write placed on a topic; print the share of trials with any beside the
  class shares, as the measure's limit, and keep it in the record and
  the aggregate.
- Normalise a written path before placing it, and put one that climbs
  out of the workspace by `..` on no topic.
- The pilot's first-write rule is unchanged.

Refs #168, #163.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DpT5xQh3AgRFs2tJwMT4g3
@braboj

braboj commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Round 1 fixes pushed (9f0551c): shell writes are no longer placed on a topic and are counted as the measure's limitation; a path leaving the workspace is on no topic.

@braboj

braboj commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Codex round 2:

# Sev Finding Outcome
1 P2 A rejected change task's transcript re-enters the timing tables Fixing: the change task's own exclusion is respected
2 P2 The vendored-path exclusion is case-sensitive on Windows Fixing: case normalised as the topic globs are

… vendored copy case aside

- A change task is timed only where its trial still carries its change
  reading, so one the re-scan left out stays out of the timing tables
  and the aggregate, while its clean build is still timed.
- A written path under the vendored copy is put on no topic whatever its
  case, as the topic globs match case aside.

Refs #168, #163.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DpT5xQh3AgRFs2tJwMT4g3
@braboj

braboj commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Round 2 fixes pushed (bb3dc5b). Codex round 3: no findings. Ready for the owner's approval.

braboj and others added 2 commits November 19, 2026 08:40
- Keep both sides' requirement and coverage rows: FR-12-19 and FR-12-20
  beside main's FR-12-21 to FR-12-23, no ID taken twice.
- Read map use main's way, per task and keyed by the build's name; the
  read timing rides on it, a named round's over each task's own trials,
  any other round's change tasks over the trials that keep their change
  reading, so a task the re-scan left out stays out of the timing.
- One reader of a call's effects carries main's section files and skill
  files, so the timing reads them as the map's use does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DpT5xQh3AgRFs2tJwMT4g3
…e, not by file

- The read timing keeps its own "before the first write", by template
  id, so two section files of one template read before it count once,
  as every other column of the table does.
- The per-arm table reads it from there, and the aggregate keeps it.

Refs #168, #163.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DpT5xQh3AgRFs2tJwMT4g3
@braboj

braboj commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Merged main (#180–#182, #184–#186) as de07bc0: read timing rebuilt on main's task-aware map use; a rejected change task still stays out of the timing.

Codex full review after the merge (gpt-6-astra, high): one finding, fixed in 0e211ea.

Severity Finding Outcome
P2 For lazysections, "before the first write" counted section files while every other column counts templates (two sections of one template read as 2) Fixed: counted by template, deduplicated

report 323/323, archive 30/30, reuse 17/17, pyflakes clean. A delta review of 0e211ea is running.

🤖 Generated with Claude Code

@braboj

braboj commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Codex delta review of 0e211ea (gpt-6-astra, high): no findings. CI passes. Merging (owner approved).

🤖 Generated with Claude Code

@braboj
braboj merged commit 5ca17de into main Nov 19, 2026
2 checks passed
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