refactor(bin): retrofit research to the ADR-0020 context contract
Description 583 -> 231 chars and body 854 -> 519 words. Deletes the
neuledge-context boundary clause outright: commit 6146120 deleted that
skill and no skill has owned MCP-server installation since. That was the
last dangling routing target in the corpus.
Removes META.md, which file-structure.md:20 forbids at a skill root. Its
when: field duplicated the description and its references: entry pointed
at .agents/skills/context7-mcp/SKILL.md, which does not exist.
Restores two rules a clean-context audit found had lost their force: the
starting-URLs branch in step 3, which the retrofit had reduced to a
condition with no behaviour, and the references/file-format.md pointer at
step 6. The second matters downstream -- validate-provenance.sh parses
sources.md with anchored regexes and check 8 short-circuits silently when
the Status field is absent, so a sources.md written from step 6 alone
broke the provenance chain with no error anywhere.
Rewrites steps 4-5 as serial WebFetch reads. They mandated spawning
subagents that allowed-tools never granted; no tool was added because the
name differs across the three compile targets. Tracked as #116.
Updates the two test pins and the eval case that asserted the dead route.
Refs #99
This commit is contained in:
@@ -534,10 +534,12 @@ expect_gate "a fixture with no authoring root reports DID NOT RUN and exits 0" \
|
||||
"Use when doing the thing. Do not use for improvements — use some-other-skill instead." 10)" \
|
||||
"Unchecked target(s): some-other-skill"
|
||||
|
||||
echo ""
|
||||
echo "--- the live dangling routing targets are caught (issue #100) ---"
|
||||
# NOTE: this section prints no header and runs no assertions any more — see why
|
||||
# below. The commentary is kept because it records why probes are removed rather
|
||||
# than skipped, which is the rule the next person to touch this file needs.
|
||||
#
|
||||
# ADR-0020 records the broken routing targets and splits fixing them into its own
|
||||
# issue. This asserts the gate actually sees them rather than the check being
|
||||
# issue. This asserted the gate actually sees them rather than the check being
|
||||
# vacuous in the corpus it was written against.
|
||||
#
|
||||
# There used to be a third probe here, for `skill-improve` in skill-audit's
|
||||
@@ -556,29 +558,26 @@ echo "--- the live dangling routing targets are caught (issue #100) ---"
|
||||
# The gitea-labels probe was dropped when the issue #99 retrofit cut the
|
||||
# composition sentence whose YAML fold produced that target. Per the rule above
|
||||
# it is removed, not skipped.
|
||||
# shellcheck disable=SC2043 # one probe left by design -- the list shrinks as
|
||||
# each fixture is retrofitted and reaches zero when `research` lands. Keeping the
|
||||
# loop means removing the last entry is a one-line edit, not a restructure.
|
||||
for probe in \
|
||||
"plugins/bin/.apm/skills/research/SKILL.md:neuledge-context"; do
|
||||
probe_file="$REPO_ROOT/${probe%%:*}"
|
||||
probe_name="${probe##*:}"
|
||||
if [[ ! -f "$probe_file" ]]; then
|
||||
fail "the probe fixture ${probe%%:*} no longer exists — this pin has become vacuous; update it and EXPECTED_DANGLING in tests/test-adr0020-targets.sh together"
|
||||
continue
|
||||
fi
|
||||
# Captured, not piped: the script exits non-zero on these files and
|
||||
# `set -o pipefail` would make the whole pipeline non-zero regardless of what
|
||||
# grep found.
|
||||
set +e
|
||||
probe_out="$("$SCRIPT" "$probe_file" 2>&1)"
|
||||
set -e
|
||||
if [[ "$probe_out" == *"routes to '$probe_name'"* ]]; then
|
||||
pass "detects the dangling '$probe_name' target in ${probe%%:*}"
|
||||
else
|
||||
fail "did not detect the dangling '$probe_name' target in ${probe%%:*}. If issue #100 retrofitted it, drop this probe and update EXPECTED_DANGLING in tests/test-adr0020-targets.sh; if a false-positive fix took a true positive with it, that is the regression this asserts."
|
||||
fi
|
||||
done
|
||||
#
|
||||
# The `neuledge-context` probe — the last one — went the same way in wave 3 of
|
||||
# that retrofit, which deleted the boundary clause naming it. **The corpus now
|
||||
# has zero dangling targets**, so this loop is removed entirely rather than left
|
||||
# to iterate over an empty list.
|
||||
#
|
||||
# That is deliberate and follows the rule stated above. A loop over no probes
|
||||
# produces no assertion while still returning success, which is the vacuous-pass
|
||||
# shape this comment block exists to reject — it would make the suite look one
|
||||
# test stronger than it is, exactly the complaint levelled at the old
|
||||
# `skill-improve` SKIP branch.
|
||||
#
|
||||
# Nothing is lost. This file only ever checked that each member of the live
|
||||
# dangling set is individually detected; tests/test-adr0020-targets.sh remains
|
||||
# the authority on the set itself, and now pins it as EMPTY, which is what
|
||||
# catches a newly-authored clause naming a target that does not resolve. That
|
||||
# file also carries synthetic fixtures built inside a real plugin tree, which
|
||||
# exercise the detection path without depending on the corpus staying broken.
|
||||
#
|
||||
# If a real dangling target ever reappears, add its probe back here.
|
||||
|
||||
echo ""
|
||||
echo "Results: $PASS passed, $FAIL failed"
|
||||
|
||||
Reference in New Issue
Block a user