Skip to content

feat: support relocated transcripts when loading scans - #117

Open
YalcinkayaE wants to merge 2 commits into
AI-Safety-Institute:mainfrom
YalcinkayaE:feat/transcripts-location
Open

YalcinkayaE wants to merge 2 commits into
AI-Safety-Institute:mainfrom
YalcinkayaE:feat/transcripts-location

Conversation

@YalcinkayaE

@YalcinkayaE YalcinkayaE commented Nov 4, 2026 •

Copy link
Copy Markdown

Part of #20. Independent of #105.

After moving a scan's source transcripts, load(scan_location, transcripts_location=...) restores source viewing from the new local eval-log file, log directory or retained transcript database. The keyword-only override is resolved and existence-checked in _transcripts_location(); existing excerpt readers and viewer links already consume the resulting location.

The full contract stays in the load() docstring. README and AGENTS.md now give short mentions in their existing load/snapshot discussions, and the using-transect skill points to the docstring.

Relocation tests now use Spec() with structural scans. They stop at unchanged frames and scan status, excerpts read from the moved source, unchanged _scan.json bytes and absence of rescanning. Invalid-path coverage remains. The extra report-rendering and encoded-link assertions were removed.

Rebased onto current main and bumped to 0.7.1. The lockfile diff contains only Transect's package-version line; dependency pins, platform markers and the seven-day cooldown are unchanged. uv lock --check and uv sync --locked pass with CI's pinned uv 0.13.5.

Validation

  • make check: 674 passed, 10 skipped; Ruff, formatting, mypy and Pyright pass.
  • Targeted ingestion/selection suite: 52 passed, including moved eval files, log directories and OpenClaw snapshots.
  • Wheel and sdist build; an isolated wheel import confirms version 0.7.1 and the keyword-only override.

AI assistance: implementation and tests prepared with Codex. The relocation tests use structural scans and make no paid model calls.

@alexandraabbas alexandraabbas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review posted on behalf of @alexandraabbas (written with Claude Code).

Thanks. The override itself is the right size: a keyword-only argument on load(), resolved and existence-checked in _transcripts_location(), no rewrite of the store, and the viewer and excerpt readers already read results.transcripts_location so nothing else needs to change. Points before merge:

Must fix

  1. Rebase and re-bump. The branch bumps 0.6.0 to 0.6.1, but main is at 0.7.0. Rebase and bump to 0.7.1.
  2. Lockfile. uv.lock changes beyond the version line (lock revision 3 to 5, platform markers dropped on h11, truststore, ptyprocess, zstandard). That means it was re-locked with a different uv than CI pins (UV_VERSION in ci.yml). Please regenerate with the pinned uv so the lock diff is only the version bump.
  3. Docs are three copies of the same paragraph. README, AGENTS.md and the using-transect skill each restate the full contract (resolves from cwd, raises on empty or missing, does not verify content, supply the same transcripts, keeps the recorded location when omitted). Keep the full statement in one place: the load() docstring already has it. In README, fold a two-line mention into the existing "load() + render()" paragraph (around the results.scan_location advice) instead of a new "Reloading moved transcripts" H2 section between Custom layers and Cost. In AGENTS.md, one sentence in the paragraph that already discusses transcripts_location and snapshot directories is enough. The skill can say "pass transcripts_location= to load() after moving the source" and point at the docstring.

Trim the tests

test_load_repoints_moved_transcripts_without_rescanning does far more than the change needs, three times over (once per source kind):

  • It runs a judged scan with demo_judge(). The override is independent of judging; use Spec() with no judge so it stays a $0 structural scan.
  • It renders a full report, then asserts on the base64-encoded viewer path and excerpt HTML. Report rendering and the viewer link encoding are covered by the report tests already. Stop at: frames and scan_status equal, read_transcript_extras() returns excerpts from the new location, and _scan.json bytes unchanged. If you want one rendered check, do it for one source kind, not three.

The invalid-path test is fine as is.

@YalcinkayaE

Copy link
Copy Markdown
Author

The head moved after Alexandra Abbas's review at 10:05 Europe/London. Current head 3e138aa was committed at 10:53:16 Europe/London on 5 November 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.

2 participants