Repository navigation
fix(sync): stop a squashed sync from undoing itself, and unduplicate the corpus control - #107
Merged
Merged
Conversation
The NON_TARGET_DIRS control restated the Framework manifest vocabulary as a literal tuple, duplicating knowledge src/skillspector/framework.py already owns. Two consequences, both the vacuous-green shape this repo guards against: the day a Framework gains a manifest kind the control keeps passing while silently ceasing to discriminate, and the literal list missed build.gradle.kts, which framework matches by prefix rather than by name. It now calls _is_jvm_build_file and _is_python_requirement_file. Verified non-vacuous against six mutants -- a SKILL.md fixture, a json-only fixture, a build.gradle fixture, a pom.xml fixture, a pyproject.toml fixture and a family parent -- all rejected. Also drops the hardcoded corpus count from the new docstring, per "Snapshot counts rot in prose; write 'every committed snapshot', never a number". Signed-off-by: Rodrigo França <rodrigo_rjsf@hotmail.com>
PR #104 was squash-merged, which kept the merged tree and dropped the record that upstream/main had been merged at all. The merge-base stayed at a818f50 and step 1 kept measuring 11 commits behind on a tree that contained all eleven, so the next sync would have re-merged them into a tree that already had them -- conflicts on identical content, and a step-5 ledger with no attributable delta left. Repaired on main in 208cfee with git merge -s ours upstream/main, which records the second parent and changes no file. Merge-base now advances to upstream's tip and the count is 0. New step 7 states the exception -- Ticket PRs are squashed on purpose, a sync PR is the one that must not be -- gives the two commands that detect a lost parent, and gives the repair with its three verifications. Applied Learning carries the one-line form. Signed-off-by: Rodrigo França <rodrigo_rjsf@hotmail.com>
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.
Follow-up to
#104, the 2.5.3 upstream sync. Three things that could not ridethat PR: two findings from its review passes, which finished after the merge
landed, and one lesson from how the merge itself was performed.
The sync PR was squashed, and that undid the sync
#104merged as a squash, somainkept the merged tree and lost the record thatupstream/mainhad ever been merged:Nothing was lost from the tree —
git diff 8516ecf 9426796was empty,python_ast.pywas present,
version = "2.5.3". Only the lineage went.The cost lands on the next sync. Step 1 of
/upstream-syncmeasures drift from themerge-base, so it would have re-merged those eleven commits into a tree that already
contains them: conflicts on identical content, and a step-5 ledger with no attributable
delta left in it — which is the one signal that tells you a resolution went wrong.
#105, the drift-measurement issue, would have reported a permanent non-zero count.Repaired on
mainin208cfeewithgit merge -s ours upstream/main, which recordsthe second parent and changes no file. Verified before pushing: tree byte-identical to
9426796's, two parents,git rev-list --countnow0, merge-base now0562b96(upstream's tip), full suite green.
This PR adds step 7 to the skill so the next sync does not repeat it. The exception is
worth stating explicitly, because the default is right everywhere else: Ticket PRs are
squashed on purpose and
CLAUDE.mdsays so — a sync PR is the one that must not be.Two review findings from
#104The corpus control restated the Framework manifest vocabulary.
test_every_non_target_directory_is_excluded_and_is_really_not_a_targetcarried aliteral tuple of
"pom.xml","build.gradle","build.gradle.kts","pyproject.toml"while
src/skillspector/framework.pyalready owns that knowledge. Two vacuous-greenconsequences: adding a Framework manifest kind leaves the control passing while it
silently stops discriminating, and the literal list restates as a name what
frameworkmatches by prefix. It now calls
_is_jvm_build_fileand_is_python_requirement_file.Verified non-vacuous — the control rejects all six mutants: a
SKILL.mdfixture, ajson-only fixture, a
build.gradlefixture, apom.xmlfixture, apyproject.tomlfixture, and a family parent.
A hardcoded corpus count in new prose. The same docstring wrote
35, against therecorded rule "Snapshot counts rot in prose; write 'every committed snapshot', never a
number." Now reads "every corpus member".
Not in this PR
The record-only corrections to
#104's step-5 ledger — two misattributed test-filecitations,
aefa482unlabelled, and#100's "seven of the eleven" being 4 rather than7 — are
commented on
#104rather than restated here. The code was unaffected; only the citations were wrong.
/license-auditagainstmainis still outstanding from#104's step 6. It isuser-invoked.
Validations
make test-unit— 2831 passed, 13 skipped, 38 deselected, 4 xfailedmake lint,make format-check— cleanmake update-snapshots— tree clean, no snapshot moved