Skip to content

audit reads a last line without a newline; shared helpers; version ranges stated once - #504

Merged
LoopGlitch26 merged 4 commits into
mainfrom
agent/issue-502
Nov 2, 2026
Merged

LoopGlitch26 merged 4 commits into
mainfrom
agent/issue-502

Conversation

@LoopGlitch26

Copy link
Copy Markdown
Member

What and why

Fixes #502. Each change below fixes something found in the 2 November review of merged outside contributions.

  • tracekit audit dropped a finished transcript's last line when it had no newline, reporting 0 calls and 0 malformed lines. hook.transcript_entries stops before an unterminated line, which is right when tailing a live file. It now takes final=True, so audit reads that line, or counts it as malformed if it's cut off.
  • Shared helpers. audit's --since uses report.when, which now also takes minutes (30m). Its safe open uses graph._open_regular, split out of _secure_source.
  • Version ranges stated once.
    • A hand-wired integration's version check takes only its pip requirement; the range is derived from it (autowire._tested).
    • A new test checks that instrument()'s FRAMEWORKS tuples match their requirement strings.
    • The five per-framework VersionCheck classes share one mixin (tests/factories.py).
  • docs/limits.md, two missing rows: a decision's expires_at is signed but not enforced; and a verifier older than 1.4 reading a bundle whose verifier_min_version was edited down skips signed findings.

How I ran it as a user

  • tracekit audit on a made-up folder whose last line has no newline. Before: 0 calls. After: the call is decided (deny). With a cut-off last line, it's counted as malformed.
  • Fail-before: the new audit test fails without the fix and passes with it. The shared version-check test passes on a fake integration and fails on a deliberately wrong one (2 passed, 2 failed, as intended).

Checklist

  • make lint build test pass: 4,031 passed before the last fix; the 7 failures were in tests/test_version_check.py (the old signature), now fixed and passing. make test-ts is running.
  • regression tests cover the change
  • user-visible changes are described above
  • docs updated (limits rows; --since 30m)
  • no fork, so no DCO needed

Security invariants

  • unchanged

Evidence format

  • not touched

… helpers; version ranges stated once (fixes #502)

- tracekit audit dropped a finished transcript's last line when it had no newline
  (hook.transcript_entries stops before an unterminated line, for tailing): it now
  passes final=True, so the line is read, or counted as malformed.
- audit's --since uses report.when, which now takes minutes (30m) too; its
  safe open uses graph._open_regular, split out of _secure_source.
- A hand-wired integration's version check takes only its pip requirement; the
  range comes from it (autowire._tested). A test checks instrument()'s
  FRAMEWORKS tuples against their requirement strings. The five VersionCheck
  test classes share one mixin.
- docs/limits.md: rows for a decision's unenforced expires_at, and a pre-1.4
  verifier reading a bundle whose verifier_min_version was edited down.
…closes its fd if fstat fails; a direct when() test; the decision-expiry row links the lifecycle page
@LoopGlitch26
LoopGlitch26 merged commit 3d23ac4 into main Nov 2, 2026
34 checks passed
@LoopGlitch26
LoopGlitch26 deleted the agent/issue-502 branch November 2, 2026 05:02
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.

tracekit audit drops an unterminated last line; shared helpers

1 participant