Skip to content

Fix the follow-up defects from the PR #113 test plan - #115

Merged
savvides merged 7 commits into
mainfrom
fix/post-ste-followups
Oct 8, 2026
Merged

savvides merged 7 commits into
mainfrom
fix/post-ste-followups

Conversation

@savvides

@savvides savvides commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Summary

This PR fixes four defects. idstack found them when it ran the manual test plan of PR #113. Each fix has a smoke check and a mutation case that puts the defect back and must fail.

  1. Rendered landing test. On ubuntu, the test failed two times with "Chrome did not expose a debugging port within 12s". The test now gives Chrome port 0 and reads the DevTools address from stderr. It waits 30 seconds. If Chrome stops, the test fails at once and shows the exit code and the last lines of output. A smoke check runs a stub Chrome that stops. Mutation 50 guards it.
  2. Plugin root. Claude Code does not put CLAUDE_PLUGIN_ROOT in the shell of the Bash tool. It replaces only the exact text ${CLAUDE_PLUGIN_ROOT} in skill text. The resolve chain used "${CLAUDE_PLUGIN_ROOT:-}", and Claude Code did not replace that text. So each $_IDSTACK/bin/... call used the newest install in the plugin cache, not the plugin that Claude Code loaded. All six copies of the chain now use the exact token. When the install has no checker, a check step now prints STE_CHECK_MISSING: <path>. New preamble rules 5, 6 and 7 tell the skill what to do with each result. Mutations 51a–51c guard it.
  3. Report folder. needs-analysis and course-import read project_name from the manifest before they wrote it. On a first run, the report went to exports/untitled-course/. The other skills wrote to exports/<course-slug>/. The two skills now take the folder name from the course title of the session. If the model does not replace the title placeholder, the block prints PROJECT_NAME_NOT_SET. Mutations 52a–52b guard it.
  4. Evidence tiers. Four skills cited two T5 papers by Sweller ([CogLoad-4], [CogLoad-19]) as T1. One citation in course-builder had two tiers in the wrong order. The new test/check-citation-tiers.py compares each [Code-N] [Tn] citation with evidence/references.md, and smoke-test runs it. Mutations 53a–53c guard it.

CLAUDE.md now gives 401 smoke assertions. The plan is in docs/superpowers/plans/2026-10-04-post-ste-followup-fixes.md.

Changes that users see

  • Who had the defect. An install from the GitHub marketplace did not have the plugin-root defect, because its newest cache directory is the installed version. A directory marketplace or --plugin-dir ran the old cached copy. So this PR needs no release.
  • IDSTACK_HOME. In plugin runs, the plugin root now comes before IDSTACK_HOME. The documented order did not change. Before this PR, the first entry was always empty.
  • Manual step after merge. The maintainer's directory marketplace at /Users/philippossavvides/github/idstack is behind main and has no bin/idstack-ste-check. Until you run git pull there, check steps print STE_CHECK_MISSING: /Users/philippossavvides/github/idstack. This result is intended.

Verification

Check Result
./test/smoke-test.sh 401/401
./test/integration-test.sh 51/51
./test/test-setup.sh 19/19
./test/test-doctor.sh 14/14
./test/test-status.sh 24/24
./test/test-preamble-python.sh 6/6
./test/test-extension.sh all pass
python3 test/test-ste-check.py OK
python3 test/check-citation-tiers.py . pass on Python 3.9.6 and 3.12
./test/mutation-test.sh guarded: 138, NOT guarded: 0, skipped: 0

A reviewer examined each task. A review of the full branch followed, and a re-review examined its fixes.

Two parts ran only on macOS. They are the DevTools listening on line through the google-chrome wrapper, and the awk, sed and env -u calls in the new smoke block on GNU tools. The ubuntu CI logs of this PR are the check.

Test plan

  • Both ubuntu legs show PASS: rendered landing page tests pass and PASS: the substituted plugin root wins over a stale cache install.
  • Each CI leg shows Results: 401/401.
  • The mutation job shows NOT guarded: 0.

🤖 Generated with Claude Code

savvides and others added 7 commits October 4, 2026 16:50
Four fixes found while running PR #113's manual test plan: the flaky
rendered landing test, the resolve chain that never finds the loaded
plugin, the untitled-course report folder, and T1 citations of T5
sources. The plan was dry-run end to end on a scratch copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use port 0 and the DevTools line on stderr, wait 30s, and fail at once
with the exit code and last output when Chrome stops early. Mutation 50
guards the early-exit check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude Code replaces only the exact token ${CLAUDE_PLUGIN_ROOT} in skill
text and never sets it in the Bash shell. The ":-" form was never
replaced, so every skill ran the newest cached install, a stale one on
directory-marketplace and --plugin-dir setups. Check steps now print
STE_CHECK_MISSING with the path when that install has no checker.
Mutations 51a-51c guard the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
needs-analysis and course-import read project_name from the manifest
before they write it, so a first run put the report in
exports/untitled-course/. Take the slug from the session's course title,
the same text the manifest step writes. Mutations 52a-52b guard the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Four skills cited [CogLoad-4] and [CogLoad-19] as T1, but references.md
files both as T5, and course-builder gave two codes swapped tiers. The
new test/check-citation-tiers.py reads each tier from references.md, and
smoke-test runs it. Mutations 53a-53c guard the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a preamble rule for a checker error, remove two semicolons from new
text, and warn when the course title placeholder is not replaced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T01:26:07.127620Z 2e8eacd PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e8eacd11f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +326 to +330
# Do not read project_name from the manifest here. Step 7 writes it, so on a first run
# the manifest has no name yet and the report lands in exports/untitled-course/.
IFS= read -r _PROJECT_NAME <<'IDSTACK_PROJECT_NAME'
<project name>
IDSTACK_PROJECT_NAME

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the existing project name on reruns

When needs-analysis runs against an existing manifest, this block always derives the export slug from the newly supplied/session title rather than the established project_name; step 7 then explicitly writes that title back. This conflicts with templates/manifest-schema.md, which says project_name must not be overwritten once set. If the user gives even a slightly different title on a rerun, future reports move to a new export folder while earlier reports remain under the old slug. Use the existing nonempty manifest value and fall back to the session title only during initial creation; the duplicated course-import block has the same problem.

Useful? React with 👍 / 👎.

Comment on lines +86 to +89
for code in CODE_RE.findall(line):
if code not in refs:
problems.append("%s: [%s] is not in evidence/references.md" % (where, code))
for m in GROUP_RE.finditer(line):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require every evidence code to have a tier

If a valid citation loses its tier—for example, [CogLoad-19] [T5] becomes [CogLoad-19]—this loop only confirms that the code exists, while GROUP_RE never matches the tierless citation. Because other citations keep cited nonzero, the checker exits successfully, allowing the exact required-tier invariant to regress. Track which code occurrences are consumed by a code-plus-tier group and report every unmatched occurrence.

Useful? React with 👍 / 👎.

@savvides
savvides merged commit c631b67 into main Oct 8, 2026
10 checks passed
@savvides
savvides deleted the fix/post-ste-followups branch October 8, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant