fix(index): a gitignored view is not stale, and one rule set decides - #92
Merged
Conversation
A project can point `[luria.paths] reports` at a build directory and publish the result as a CI artifact rather than committing it. A fresh clone then never has the file, so missing read as stale — and the remedy the failure printed, "regenerate and commit the result", is the one thing `.gitignore` forbids. Downstream that was a docs job red on every commit for a day, on a check nothing could satisfy. `--check` now excludes gitignored outputs from all three staleness kinds; writing is unchanged, since "not committed" is not "not wanted" and that report is what the artifact upload publishes. Fixing it once was not enough, which is the more interesting half. `luria lint` and `luria index --check` each carried their own copy of the same three rules, so the exemption landed in the generator and the linter went on rejecting the tree the generator had just called current — the fixer/linter split this package exists to prevent, reproduced inside it. `adr_index.staleness()` is now the one answer both consume, with only the wording left in the linter, and a test pins the agreement from outside. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012AWc5urqmvaJUhcvy1VWLM
dmarx
force-pushed
the
fix/ignored-views-are-not-stale
branch
from
August 16, 2026 06:19
b51988d to
a1cd697
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Independent of #91 — branched from
main, merges in either order.The failure
strata-g points
[luria.paths] reportsatbuild/doc-reports/and publishes the result as a CI artifact rather than committing it.build/is in.gitignore. Its docs job checks out clean,git clean -ffdxremovesbuild/, and:A fresh clone never has the file, so missing reads as stale, and the remedy the failure prints is the one thing
.gitignoreforbids. That job has been red on every commit since 2026-08-15T06:42Z on a check nothing can satisfy — DP-1 wearing a green hat: the tool refused and its explanation was impossible to act on.--checknow excludes gitignored outputs from all three staleness kinds. Writing is unchanged —luria indexstill renders an ignored view, because not committed is not not wanted; that report is precisely what the artifact upload publishes.Fixing it once wasn't enough, and that's the more interesting half
The exemption went into
adr_index.run(check=True).luria index --checkthen said current on the tree — andluria lintwent on rejecting the identical tree.lint.check_generated_indexhad its own copy of the same three rules (stale view / orphan in a view directory / drifted README badges). Two code paths asking one question, so a fix reaches one of them. That is the fixer-linter split this package exists to prevent, reproduced inside the package —doc_refsis a shared module for exactly this reason, and the staleness rules never got the same treatment.adr_index.staleness()is now the single answer both consume. Only the wording stayed with the linter, because a build log and a--checkwant different sentences.Tests
Three, in
tests/test_doc_reports.py:test_a_gitignored_report_dir_is_not_staleskip = set()→ failstest_a_tracked_report_dir_still_gates.gitignore, not the reports dirtest_lint_and_index_check_agree_about_staleness418 pass.
luria lintclean on this repo.Verified against the real downstream tree:
rm -rf build && luria lintin strata-g goes from exit 1 with 2 violations to exit 0.Generated by Claude Code