You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Condense the Block to Its Invariant, and Let the Tests Carry the History
Seven lines of incident history above four lines of code buried the rule
they were explaining, and history is the part that drifts. Three lines now:
the invariant, what follows from it, and where the cases live.
The rationale is not lost. Each case in TestScanRootDecidesTheRuleSet
carries the reason it exists, which is where a reader who wants the history
should be sent, and where it cannot go stale without a test failing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
# The rule set is decided by the repository being scanned, never by the directory the caller stands in.
1110
-
# Reading it from `.` discarded home-path on a release repository whenever the caller happened to stand in an operational one.
1111
-
# That silenced the rule that exists because real paths reached a public comment, announcing it on stderr and exiting 0.
1112
-
# A run spanning two repositories refuses instead of picking one, since the two can declare different models and one rule set cannot be right for both.
1113
-
# Only a repository declares a workflow model, so only distinct repositories are ambiguous.
1114
-
# Two loose paths under no repository are not a conflict.
1115
-
# Refusing on them would break the ordinary multi-file invocation outside a checkout, where every argument resolves somewhere different.
1109
+
# The invariant: the rule set is decided by what is scanned, and no path here reads the working directory to decide it.
1110
+
# Only a repository declares a model, so two of them refuse and anything else resolves to one anchor.
1111
+
# TestScanRootDecidesTheRuleSet carries the cases and the reason each one exists.
0 commit comments