Skip to content

fix: hygiene refs flags companion-workspace and run-output paths as dead - #584

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/hygiene-refs-false-positives
Nov 4, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/hygiene-refs-false-positives

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

In the 2026-11-04 sweep, pyauto-brain hygiene refs reported 19 dead references, and 16 of them were false positives. The scanner now retries a reference that is dead in its own repo against the places it legitimately points to, before reporting it:

  • Companion workspace: a HowTo course's prose points readers to its workspace, e.g. "the workspace's scripts/interferometer/modeling.py". The pairing comes from the naming convention (HowTo<Name> to auto<name>_workspace), not a hard-coded list, so the tenant firewall stays clean. It only applies if that checkout exists.
  • A sibling named on the same line: e.g. "<project>_assistant's colab/contexts.yaml".
  • Folders a run creates: RUNTIME_DIRECTORIES adds files, cache, cache_root and work. They are unresolvable, not dead, just like output and dataset.
  • Generated folders: notebooks is unresolvable in a checkout that doesn't commit it (generated at release).

A path that is dead in its repo and in every alternative is still a finding.

Closes #583.

Tests

  • test_refs_checks_companion_workspace_and_named_sibling: references that resolve in the companion workspace or the named sibling aren't flagged, and a path dead in both still is.
  • test_refs_treats_run_output_and_generated_folders_as_unresolvable.
  • Control check: both new tests fail against the old scanner. pytest tests/test_hygiene_*.py gives 88 passed.
  • Tenant firewall: OK. Fixtures use the made-up HowToDemo and autodemo_workspace.
  • Live tree: 19 findings (16 false) before the workspace fixes, 0 now, with 282 unresolvable references still skipped.

🤖 Generated with Claude Code

…output folders (#583)

16 of 19 refs findings in the 2026-11-04 sweep were false positives: HowTo prose pointing into its companion workspace, a sibling repo named on the same line, and folders a run creates (files/, cache/, cache_root/, work/) or a release generates (notebooks/). A reference dead in its own repo is now retried in those before it is reported; a path dead everywhere is still a finding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit f3afe13 into main Nov 4, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/hygiene-refs-false-positives branch November 4, 2026 21:50
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.

fix: hygiene refs flags companion-workspace and run-output paths as dead

1 participant