Release 0.7.1: the tier 0.7.0 announced was never reachable - #485
Merged
Conversation
Release 0.6.0
Release 0.7.0 — the behaviour claim is measured
0.7.0's headline change made `[directive]` reachable and it reached nobody. `commander` declares `--trusted-author` with a default of `[]`, so the flag arrives as an empty array rather than undefined when absent, `?? ` passes it through, and the fallback to the author `init` records is dead code. Every record on every install still graded `[claim]` -- the condition #415 was opened about, reintroduced one layer up by the fix for it. Resolution is on length now. An explicit flag is always non-empty and an absent one is always empty, whichever shape commander hands over, so the test matches what the caller meant rather than what the framework happened to supply. The tests that passed drove `buildInjection` with options assembled by hand and never crossed the command line, which is the only path the hook uses. The four new cases spawn the built CLI. They fail against the 0.7.0 build, which is the only property that makes them worth having. That file's header already carried the warning, one layer down: a unit test of `gradeRecord` would have passed throughout the period the original bug existed. The same sentence applied to `buildInjection` and I did not hear it. `package-lock.json` declared 0.1.0 while both manifests read 0.7.0, stale since the first release, and moves with them now. The CHANGELOG carries two corrections to 0.7.0's own review evidence: the promotion PR said 132 commits where the range holds 137, and seven install checks in RELEASE-GATE section 4 where it lists six. Both were mine. Limit: 0.7.0 stays published with its notes amended to name the defect at the top; retracting a tag people may already have installed trades a known-bad version for an unknown one Ruled-out: deleting the v0.7.0 tag and re-cutting it | rewriting a published ref breaks every clone that already fetched it, and the release notes can carry the truth without that Ruled-out: reading the flag with a nullish check and documenting the commander default | the documentation would sit in this file while the defect sits in every install, which is the arrangement that produced this Warn: any option declared with a non-nullish default has the same shape, and nothing checks for it -- this fix repairs one site, not the class Blast: system Undo: easy Certainty: firm Verified: the released 0.7.0 artefact renders `[claim]` for `inject --path` and `[directive]` only with an explicit flag, the patched build renders `[directive]` for the same plain invocation, and the four CLI-spawning cases pass alongside the six that already existed Provenance: authored Record-Id: r-rel071
CommitLore — record lintTrailers: clean — 4 commits in Active constraints for the paths this PR touchesLimits (174)
Ruled out (407)
Truncated: 360 lines omitted — the comment hit GitHub's 65000 character limit. Trailer violations fail this check. Active constraints are informational — they are what the repository already decided, not a verdict on this PR. |
The first fix repaired `inject` and its own Warn line said it repaired one site rather than the class. Sweeping the class found the second site immediately: `query.ts` resolved trusted authors with the same nullish check against the same commander default, so `commitlore context` reported `claim` for a record the hook rendered `directive`. The comment at that line already said the two routes must answer alike, or the grade means one thing on the hook and another on the terminal. That sentence was written before the fallback existed on either route, stayed true while neither had it, and became false the moment one did. A comment asserting a property is not the property, and nothing was checking. Two cases now compare the routes directly, configured and unconfigured, and they run the built CLI rather than the functions behind it -- the same reason the first four exist. Limit: the sweep covered `?? ` against an options field in src/commands, which is the shape that produced both defects; an option whose default is consumed some other way would not have shown up Ruled-out: threading a cwd parameter into queryOptions to match inject | this route resolves the repository it was invoked in and has no cwd of its own, so a parameter would exist only to look symmetrical with a function that needs one Ruled-out: deleting the comment now that a test enforces it | it explains why the routes must agree, which the test asserts but does not say Warn: both routes now read git config on every invocation, including the hook on the hot path of every edit -- one local config read, but it is new work in a place that is measured in milliseconds Blast: system Undo: easy Certainty: firm Verified: against the same repository the released artefact was reproduced in, `context` and `inject --path` both render directive with a configured author and both render claim without one; twelve cases pass in the trusted-author suite Provenance: authored Record-Id: r-queryroute
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.
Closes #484. Patch on top of the released 0.7.0. Two sites, not one.
What shipped broken
0.7.0's headline change made
[directive]reachable. It reached nobody.commanderdeclares--trusted-authorwith a default of[], so the flag arrives as an empty array rather thanundefinedwhen absent,??passes it through, and the fallback to the authorinitrecords is dead code. Every record on every install still graded[claim]— the condition #415 was opened about, reintroduced one layer up by the fix for it.Sweeping the class found the second site
The first commit's
Warn:said it repaired one site rather than the class. The sweep foundquery.tsimmediately:And the comment at that line already asserted the property:
That sentence was true while neither route had the fallback and became false the moment one did. A comment asserting a property is not the property, and nothing was checking. Both routes now agree, and two cases compare them directly — configured and unconfigured.
The fix
Resolve on length. An explicit flag is always non-empty and an absent one always empty, whichever shape commander hands over.
Why the tests passed, and what changed
They drove
buildInjectionwith options assembled by hand and never crossed the command line, which is the only path the hook uses. The six new cases spawn the built CLI; they fail against the 0.7.0 build, which is the only property that makes them worth having.That file's header already carried the warning one layer down — "a unit test of
gradeRecordwould have passed throughout the entire period this bug existed" — and the same sentence applied tobuildInjection.Also
package-lock.jsondeclared0.1.0while both manifests read0.7.0. Stale since the first release.Corrections to 0.7.0's own review evidence
Recorded in the CHANGELOG, because leaving them unremarked is the same failure in miniature: the promotion PR said 132 commits where the range holds 137, and seven install checks in
RELEASE-GATE.md§4 where it lists six.0.7.0 is not retracted
Its notes now carry the defect at the top with a reproduction. Deleting a published tag breaks every clone that already fetched it.
Stated costs
Both routes now read git config on every invocation, including the hook on the hot path of every edit. One local config read, but new work in a place measured in milliseconds — for #472's budget to bound.
The sweep covered
??against an options field insrc/commands, the shape that produced both defects. An option whose default is consumed some other way would not have shown up.103 files, 2,271 cases pass. Dogfood re-run after each commit.