Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
bump: patch
---

### Changed

- Tidied check-deck.mjs: the K2 refusal reuses the local-result helper, and the header usage lists the hosted argument the parser already accepts.
8 changes: 3 additions & 5 deletions plugins/visualization/skills/present/scripts/check-deck.mjs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The pr-verify verifier failed head 083802201d3d9d8fbbccadcba5ce7567482e856c. What it wrote, as data:

Summary: PR #12765 has no spec to judge against. spec.json and spec-text.json are both empty arrays:
  the PR closes no issue, has no `Refs:` line, and spec-text.json holds no pull-request entry. The
  rules require `fail` when there is no spec. The diff itself is a small, behavior-preserving tidy
  of check-deck.mjs and shows no correctness or safety defect. The test-bash (0) job passed, and
  test-bash is the lane that runs the wrapped present.test.mjs suite.
- pr-verify-data/spec-text.json: empty, so there is no trusted spec text. The PR body says "No
  related issue: code-tidying upkeep sweep." and names no issue to close or reference. To fix, link
  a trusted issue that asks for this tidy, with `Closes #<n>` or `Refs: #<n>`, or have a trusted
  person or script write the PR title and body so they count as the spec.
- plugins/visualization/tests/present.test.mjs: CI runs this suite through its wrapper
  present.test.sh, and that wrapper's lane, test-bash (0), concluded success on the judged head
  (https://github.com/melodic-software/claude-code-plugins/actions/runs/41590663435/job/125818515830).
  test-node was skipped, which is expected because the suite runs only through its wrapper.
- plugins/visualization/skills/present/scripts/check-deck.mjs:32: `local()` now takes an optional
  `extra` argument that is spread after `reason`. The K2 refusal at line 43 still emits the keys
  medium, class, reason, refused in the same order, so the output does not change.
- plugins/visualization/skills/present/scripts/check-deck.mjs:22: the header usage comment now lists
  `hosted` among the `--argument` values. This edits a comment only.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

pr-unblock / address-feedback: UNCERTAIN, left open

Evidence: plugins/visualization/skills/present/scripts/check-deck.mjs:213

The verifier failed this head only because the pull request has no spec: it closes no issue, carries no Refs: line, and spec-text.json is empty. Its own notes find no correctness or safety defect in the diff. The K2 refusal at check-deck.mjs:213 still passes { refused } through local(), and the usage comment at check-deck.mjs:11 lists hosted, both behavior-preserving as the verifier says. The missing spec cannot be supplied by a file change in this thread's scope: it needs a trusted issue linked with Closes or Refs in the pull request body, or a trusted person writing the title and body. Leaving this open for a person to link a spec or accept the tidy without one.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Answered in #12806, an owner-login replacement. Its title and body are trusted spec text, which this head lacked. It also changes the code: local() in check-deck.mjs takes the refusal list as a named argument instead of an open extra spread that could overwrite medium or class, and a new test in present.test.mjs pins the K2 refusal keys and order. Tests: 55/55 pass. This PR is held as superseded.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// send. Prints one JSON object.
//
// check-deck.mjs <root> <PUBLIC|PRIVATE|INTERNAL|UNKNOWN|NONE> --class K0|K1|K2
// [--argument terminal|file|artifact] [--option <plugin medium option>]
// [--argument terminal|file|artifact|hosted] [--option <plugin medium option>]
// Exit 0 decided (read `medium`), 1 a deck refused, 2 usage or an unreadable root.

import { existsSync, lstatSync, readdirSync, readFileSync, realpathSync } from "node:fs";
Expand Down Expand Up @@ -184,7 +184,7 @@ function workTree(dir) {
* @param {{root: string, visibility: string, cls: string, layers?: {argument?: string|null, option?: string|null, home?: string, project?: string|null}}} input
*/
export function checkDeck({ root, visibility, cls, layers = {} }) {
const local = (exit, reason) => ({ exit, result: { medium: "file", class: cls, reason } });
const local = (exit, reason, extra = {}) => ({ exit, result: { medium: "file", class: cls, reason, ...extra } });
const resolved = resolve(root);
if (lstatSync(resolved).isSymbolicLink() || realpathSync(resolved) !== resolved) {
return local(2, `the deck root ${resolved} is or passes through a symlink; pass its real path`);
Expand All @@ -210,9 +210,7 @@ export function checkDeck({ root, visibility, cls, layers = {} }) {
if (badTitle) return local(1, badTitle);
if (cls === "K2") {
const refused = k2Refusals(files);
if (refused.length) {
return { exit: 1, result: { medium: "file", class: cls, reason: "a K2 deck carries more than text in the slide format", refused } };
}
if (refused.length) return local(1, "a K2 deck carries more than text in the slide format", { refused });
}
const { medium: chosen, source, warnings } = trustedMedium(layers);
const extra = warnings.length ? { warnings } : {};
Expand Down
Loading