Skip to content

Evidence: untracked-file contents, pytest summary parsing, optional runtime test-verification hook - #20

Closed
tydinjarman wants to merge 4 commits into
thruwire:mainfrom
tydinjarman:pr2-evidence
Closed

tydinjarman wants to merge 4 commits into
thruwire:mainfrom
tydinjarman:pr2-evidence

Conversation

@tydinjarman

Copy link
Copy Markdown
Contributor

Title: Evidence: untracked-file contents, pytest summary parsing, optional runtime test-verification hook

Backends that buffer or summarize their output (Hermes Agent CLI on Windows,
in our case) leave the supervisor without executed-test evidence: git diff
never shows untracked test files, and stdout may never contain a pytest
summary. Jev then scores tests_sufficient ~0.14 for a run that actually
passed 2/2 (verified by direct pytest in the same working tree).

  • untracked_evidence in FactoryObservation: bounded head-of-content for up
    to 3 untracked text files (+4 tests).
  • pytest summary parsing from worker output into test_results ("N passed",
    "N failed, M passed") (+4 tests).
  • Runtime test-verification hook (FOREMAN_VERIFY_TESTS_ON_COMPLETE, default
    False): after a CODING worker completes, the runtime runs the repo's pytest
    itself (bounded by FOREMAN_TEST_COMMAND_TIMEOUT, default 120s) and emits
    a real TEST_RESULT event. Backend-independent hard evidence; failures are
    non-fatal — evidence-gathering, not a gate (+3 tests).

With the hook enabled we observed tests_sufficient climb 0.13 -> 0.57 across
a run (previously flatlined at ~0.14) and 3/3 FINISHes vs 4 prior ESCALATEs.

Tydin Jarman added 4 commits September 22, 2026 08:49
hermes workers write test files as UNTRACKED files (invisible to git diff)
and buffer their NDJSON output, so Jev never sees test evidence: on mraize
tests_sufficient flatlined at 0.05 for 16 assessments while tests passed
2/2. Two observation fixes:
- untracked_evidence: bounded head-of-content for up to 3 untracked text
  files from git_status (skips binary/dirs, truncates large)
- test_results parsed from worker stdout pytest summary lines ('N passed',
  'N failed, M passed') so executed-test evidence reaches the assessment
+6 tests. Full suite: 115 passed (2 pre-existing Windows failures).
With verify_tests_on_complete, foreman runs the repo's pytest suite itself
after a coding worker completes (bounded by test_command_timeout) and
emits a real TEST_RESULT event. This gives the supervisor hard,
backend-independent test evidence — the missing channel for backends with
buffered/silent output (hermes on Windows), where tests_sufficient could
never converge. Failures are non-fatal (evidence-gathering, not a gate).
+3 tests.
@JARosen

JARosen commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Thanks for documenting the evidence gap you observed. The core ideas here—showing bounded untracked-file content and extracting structured test evidence from worker output—are useful, but this branch is not ready to merge as-is.

I reviewed it against current main. It conflicts in the configuration and observation paths, and the PR includes unrelated Hermes backend and policy changes plus dozens of calibration, patch, and session scripts. The branch’s src/tests suite passes in isolation, but the full repository lint check fails extensively because those artifacts are committed.

There are also a few correctness details that need tighter coverage. In particular, the runtime verification parser needs to handle normal failure-first pytest summaries such as 1 failed, 3 passed, and timeout cleanup should fully reap the test subprocess. Tests should assert the parsed outcome rather than accepting an error or any summary as success.

Could you extract this into a fresh branch from current main, with no Hermes or policy changes? I would suggest separate focused changes for:

  1. bounded untracked-file evidence;
  2. worker-output test-summary parsing;
  3. optional runtime-owned test execution.

That separation will let us review the security, observation-size, and process-lifecycle implications independently.

@tydinjarman

Copy link
Copy Markdown
Contributor Author

Superseded by three focused PRs, rebuilt from current main per your review:

No Hermes, policy, or session-script content. Closing this one.

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