Skip to content

feat(planning): keep a re-issued interview question's history across supersede chains - #10430

Merged
melodic-automation-lanes[bot] merged 4 commits into
mainfrom
work-resolve-issue/issue-9721-40447182374-1
Oct 27, 2026
Merged

melodic-automation-lanes[bot] merged 4 commits into
mainfrom
work-resolve-issue/issue-9721-40447182374-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #9721

Summary

Opened by the work-resolve-issue lane. The run's own summary:

A question re-issued through supersedes now keeps its history (gap G6). The server derives a never-written supersedesChain. The page shows the whole chain ('Asked as Q5 in round 2, then Q35 in round 4') and counts carried rounds from the chain's first question in the same stage. The 'Still open from earlier rounds' section is pinned in Groups, Rounds and Tree. One write that supersedes three or more questions one for one warns and points to revise, and archive now clears any hold on the questions it archives.

Not verified

  • The issue's test commands were not run: scripts/run-test-file.sh on test_server.py and test_round.py, and bash plugins/planning/surface/surface.test.sh (including the new ui_page phase 18 browser checks). This lane's Bash runs only the named wrappers, so no Python, node or playwright-cli could run.
  • Existing browser suites (ui_a, ui_b, ui_journey, ui_page phases 13-17) now run with a pinned carried section in Groups view wherever an earlier round has an open question. In Groups, j/k now visit carried questions first, and the first .qbtn[data-q] match is the pinned copy. The review found no as
  • The issue's 'scripts/check-changelog-fragments.sh --check-required origin/main' was not run in that form. The runner's check-changelog-fragments wrapper passed with no arguments; the --check-required diff against origin/main is left to the PR's CI.
  • The mass-supersede threshold (3 questions in one write) is a judgment call: the issue's test uses 3 and names no threshold. It is the MASS_SUPERSEDE constant in round.py.
  • Untracked dotfiles in the checkout root (.bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc) were not created by this run. They were left untouched and are not part of the change.

Fix

  • plugins/planning/surface/server.py: new supersede_chains(doc) walks each question's supersedes links (it stops on a cycle or an unknown id). read_state sets the result as supersedesChain on each question, in memory only.
  • plugins/planning/surface/index.html: chainOf/firstOf/firstAsked/chainHtml. The detail pane shows 'Asked as <id> in round N, then ...' in place of the one-step Supersedes link, which stays as the fallback when there is no chain. carryOver counts from the chain's first same-stage question, and t
  • plugins/planning/surface/round.py: op_archive clears waiting/waitsOn/waitingBy/waitingSince on each archived question. When a hold was set it adds a 'No longer <hold>.' history line before the Archived line; the set-aside stamps stay. New MASS_SUPERSEDE = 3 and warn_mass_supersede, called from
  • plugins/planning/surface/schema/questions.schema.json: documents the derived supersedesChain field ({id, round, stage?}, never written).
  • plugins/planning/surface/test_server.py: TestSupersedeChain covers a three-link chain giving both earlier ids first-asked-first with rounds, a cycle, an unknown id, and the field staying out of questions.json.
  • plugins/planning/surface/test_round.py: TestMassSupersede covers add-round superseding 3 questions (warning names revise and the pairs), apply add ops counted together, and 2 supersedes giving no warning. TestArchive.test_archive_clears_a_hold archives a question with a waiting hold and finds the ho
  • plugins/planning/surface/tests/ui_page.js: phase 18 checks the derived chain. In Groups view it checks the pinned section comes first, holds Q19 and neither predecessor, keeps Q19 in group g1, and repeats no element id; it also checks the 'asked 2 rounds ago' chip counted from Q17's round 1 and the
  • plugins/planning/surface/surface-checks.sh: the ui_page group adds the Q17 -> Q18 -> Q19 supersede chain and runs phase 18; gphases goes 17 -> 18 and CHECKS[page] goes 106 -> 112.
  • plugins/planning/surface/README.md: add row (mass-supersede warning), archive op row (clears holds), and data contract (supersedesChain, the chain line, carried count, pinned section in every view).
  • plugins/planning/skills/interview/context/surface.md: add/add-round row documents the warning, supersedesChain, the chain line, the carried count and the pinned section; archive row documents hold clearing.
  • .changes/planning/feat-9721-supersede-chain-history-a3f19c62.md: new minor changelog fragment for planning. It was written by hand because new-changelog-fragment refuses a detached HEAD.

Verification

The runner ran each check from the base copy against bfd5bb5:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-changelog-fragments: 'All 8 changelog fragment(s) under .changes/ are valid.' (run before and after the review fixes)
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-affected: '12 passed, 5 skipped over 11 changed files'. It skipped validate-plugins sub-checks that run checked-tree code, typos (not installed) and changed-skills; the remaining checks are listed as CI only. Run before
  • cant-fail-scan --file plugins/planning/surface/test_round.py --check: PASS, no gating findings (304 test blocks parsed)
  • cant-fail-scan --file plugins/planning/surface/test_server.py --check: PASS, no gating findings (236 test blocks parsed)
  • read https: //github.com/melodic-software/claude-code-plugins/issues /5796: the parent issue's G6 text. Re-issuing by archive-and-replace loses history (Q5-Q30 to Q35-Q60 to Q61-Q86). It asks to show the full chain, compute the carried count from the chain's first question, pin the carried section i
  • Fresh-context review subagent over the whole diff. It confirmed three findings, all fixed: revealInRail scrolled to the pinned copy, restoreFocus moved focus to the pinned copy, and the tooltip named a cross-stage chain head. It also raised two doc nits, both fixed (stage only when set; warning show
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40447182374

Left out: the items under Not verified.

Related

#9721

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 670b1c6a4dc412a1cfd41ffb42e4de319a18fed7: 0 finding(s), 0 as inline comments.

I found no security issues in this pull request, so there are no inline comments and no hold. I read all 553 lines of .claude-lane/pr.diff and the PR context file. I did not run any code.

Skip gates: none applied. I reviewed the whole diff because it touches index.html rendering and server-side question handling.

Trusted paths: none of the 11 changed files match a TRUSTED PATHS glob. The change is confined to plugins/planning/surface/, plugins/planning/skills/interview/context/surface.md and one .changes/ fragment. It touches no trust control: not the trusted-actor check, token request, kill switch or merge holds, and not any workflow, plugin.json or marketplace.json. No manifest items were hit, so there are no manifest <field> lines.

What I checked:

  • XSS in index.html:
    • chainHtml builds markup from server-derived supersedesChain entries. The round goes through esc(String(...)). The stage goes through esc(stageLabel(...)). Each id goes through the existing refHtml.
    • chainOf keeps only ids that exist in the local Q map, so an unknown id cannot reach the markup.
    • The chip tooltip adds firstOf(q).id inside esc(...), so it is escaped too.
    • The pinned-copy rewrite, h.replace(/(id|aria-describedby)="qd-/g, ...), runs on HTML that was already escaped. It only renames id prefixes and adds no injection surface.
  • server.py supersede_chains:
    • It is read-only and in memory, and it checks the types of id and supersedes.
    • It stops on a cycle or an unknown id, so crafted supersedes links cannot loop it.
    • It sets supersedesChain on the served state only. The test confirms it never reaches questions.json.
  • round.py:
    • warn_mass_supersede only writes a warning.
    • op_archive pops hold keys and adds a history line. The label comes from the fixed HOLD_LABELS table with a fallback, not from user input. It lowers no authorization check, and archiving already required the same access.
  • Schema, docs, tests, surface-checks.sh: documentation and fixtures only. Renumbering the phases and the sweep question to Q20 has no security effect.
  • Embedded instructions: the PR context file holds no text that tells the reviewer to pass the PR, skip a check or drop a finding.
  • Instruction-surface deletions: the diff removes no standing instruction. The surface.md rows only gain text.

Spend: the change adds no billed resource. It sets no turn limits or timeouts and changes no model choice or run schedule.

critical-findings: 0

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 670b1c6a4dc412a1cfd41ffb42e4de319a18fed7: 0 finding(s), 0 as inline comments.

No findings. I read the full diff and the PR context, and I checked the changed round.py paths against their callers. I ran no tests or commands. The PR body says the Python tests and the browser suite were not run in the lane. I treat that as author-claimed and unverified.

Closing issue #9721 criteria

  • Three-link chain page test: met. ui_page.js phase 19 checks the server-derived chain Q17@1, Q18@2 and the Asked as Q17… in round 1, then Q18… in round 2 line. It also checks the asked 2 rounds ago chip counted from round 1.
  • Carried section in Groups view: met. Phase 19 checks that the pinned section comes first, holds Q19 and neither predecessor, keeps Q19 in its group, and repeats no element id. It also checks the Tree view.
  • Mass supersede of 3 questions warns and names revise: met. TestMassSupersede covers add-round and apply. lint_questions is called from the add, add-round and apply paths (round.py:1922, 1928, 2208). apply passes the whole write's added questions in one call, so the count is per write.
  • Archive clears a waiting hold: met. TestArchive.test_archive_clears_a_hold asserts the four hold keys are gone. The No longer … label and the key list match op_wait's clear branch (round.py:1715-1718).
  • The run-test-file.sh commands, surface.test.sh and check-changelog-fragments.sh --check-required origin/main are not confirmed here. They depend on CI.

Other checks

  • supersede_chains is derived in memory only. It stops on a cycle or an unknown id. The test checks that it stays out of questions.json.
  • The pinned copy in Groups and Tree rewrites qd- ids to pqd-. The other .qbtn[data-q] lookups (index.html:1015, 1031, 2436-2438) handle two cards. revealInRail picks the visible one and restoreFocus keeps the pinned flag.
  • The surface-checks.sh counts are consistent. Phase 19 adds 6 checks (5 plus the console-errors check), taking the page group from 112 to 118. gphases goes from 19 to 20.
  • Phase 19's carried-count check depends on 3 being the newest interview round in the ui_page fixture. I could not confirm that without running it.
  • The changelog fragment is bump: minor for an added feature with changed behaviour, which fits.
  • Not a finding: the PR body's phase numbers (17→18, 106→112) are out of date against the diff (19→20, 112→118).
  • No plugin.json or marketplace.json change, so no manifest lines apply.
  • No trusted-path files changed. No spend, billing or hold concerns.

Lane-Activity: pr-unblock/resolve-conflicts
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head f20070bba01eb63de5078fbde3fe6bda158a6702. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:missing)

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Oct 27, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped on this pull request and needs a person: the lane could not fix every failing check; its run log names each one and why.

  • Reason: ci-fix-escalated
  • Resume key: f20070bba01eb63de5078fbde3fe6bda158a6702 (the head the lane stopped on)

To resume, deal with the reason above, remove the needs-human label (and do-not-merge, if set), then dispatch the pr-unblock workflow with pr-number=10430 and activity=fix-ci:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=10430 -f activity=fix-ci

Lane-Activity: pr-unblock/resolve-conflicts
@kyle-sexton kyle-sexton removed the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Oct 27, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 27, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head a006ffd130af5dc273cdba87b7fb7ac9c28f4da2.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 27, 2026
@melodic-automation-lanes melodic-automation-lanes Bot added the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Oct 27, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped on this pull request and needs a person: the merge stages a change under .github/workflows/, which the lane does not push.

  • Reason: workflow-staged
  • Resume key: a006ffd130af5dc273cdba87b7fb7ac9c28f4da2 (the head the lane stopped on)

To resume, deal with the reason above, remove the needs-human label (and do-not-merge, if set), then dispatch the pr-unblock workflow with pr-number=10430 and activity=resolve-conflicts:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=10430 -f activity=resolve-conflicts

# Conflicts:
#	plugins/planning/surface/round.py
#	plugins/planning/surface/surface-checks.sh
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane escalated this pull request as workflow-staged, and that no longer holds at 670b1c6a4dc412a1cfd41ffb42e4de319a18fed7: main changes nothing under .github/workflows/ since its merge base with 670b1c6. pr-merge removed needs-human, so the lanes run on it again. To keep a person on it, add needs-human back: a label a person adds is never removed.

@melodic-automation-lanes melodic-automation-lanes Bot removed the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Oct 27, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 670b1c6a4dc412a1cfd41ffb42e4de319a18fed7.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 9078a8b Oct 27, 2026
89 of 91 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-9721-40447182374-1 branch October 27, 2026 21:40
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 0, survived 0, timeout 0, no coverage 0, invalid 0, not run 8.
Covered-code score n/a; mutation score n/a.

File Killed Survived Timeout No coverage Invalid Not run
plugins/planning/surface/round.py 0 0 0 0 0 3
plugins/planning/surface/server.py 0 0 0 0 0 3
plugins/planning/surface/surface-checks.sh 0 0 0 0 0 2

The run's summary has the full report.

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.

feat(planning): keep a re-issued interview question's history across supersede chains

1 participant