Skip to content

feat(replace): replace text shows how many nodes were skipped - #2637

Open
shadowbrush wants to merge 3 commits into
mainfrom
jill/2531-skipped
Open

shadowbrush wants to merge 3 commits into
mainfrom
jill/2531-skipped

Conversation

@shadowbrush

Copy link
Copy Markdown
Member

Refs #2531 (AT0.8694; T1 Standard per its CHECKED gate comment).

What: replace text selects nodesSelected and nodesSkipped. Text mode prints Skipped N node(s): protected from inspection and replacement (comments, governed nodes, compiled boot prompts, or nodes under a Channel's address); they still have the old text. under the unchanged totals line, only when N > 0; --json always carries both keys (0 included) beside the existing ones. Dry run, applied run and the no-match run (which still prints "No matches" on stderr and writes nothing) all behave this way.

Older server: no floor change: SearchReplaceResult is the same type searchReplaceInSpecNodes returns and spec_corpus.graphql:200-202 already selects both fields, so the CLI already assumes a server that has them.

Kinds named on the line, checked against the server (hadron-server origin/main 53a805756, resolvers.mutation.node.ts searchReplaceInNodes): comments ("a comment is governed too"), governed roles/runnable nodes, compiled boot prompts (#2043) — all counted as skipCounts.governed — and nodes under a Channel's address (protectedAddress); nodesSkipped = governed + protectedAddress. The meaning of the two counts is quoted from the schema descriptions.

Help: replace text no longer says the count is not reported (it says it is, when it prints and what nodesSelected/nodesSkipped mean); the --json key list names both; agentic-usage.md (line 562) says so. The replace text inventory row's hash is regenerated and the row resets to unread (it was pass), so the evaluator re-reads it after merge; nothing else in the inventory changes.

Evidence

  • Red first: the pins commit (replace_skipped_2531_test.go) fails on main (the operation selects neither field): dry-run/applied × text/--json, nothing-skipped (no Skipped line, JSON keys with 0), and no-match.
  • Two existing tests that pinned the exact --json key set (replace_1227_test.go) now include the two additive keys; every previous key, exit code and the totals text are unchanged.
  • make generate (genqlient), go test ./..., make lint 0 issues, make help-inventory-check clean.

Scope: replace text only; spec replace and the server's skip rules untouched.

— Jill, CLI Engineer · Claude/Anthropic (claude-sonnet-5-5)

🤖 Generated with Claude Code

shadowbrush and others added 2 commits November 19, 2026 12:34
Dry-run and applied, text and --json, nothing-skipped and no-match runs.
Red on main: the operation selects neither nodesSelected nor nodesSkipped.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Worker: Jill (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:jill>
…2531)

Selects nodesSelected and nodesSkipped. Text mode prints "Skipped N node(s): ..."
under the unchanged totals line only when N > 0; --json always carries both
keys (0 included). The help stops saying the count is not reported, the
agentic-usage line says it, and the replace text inventory row's hash is
regenerated (it resets to unread).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Worker: Jill (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:jill>

@claude claude 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.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@shadowbrush

Copy link
Copy Markdown
Member Author

BLIND review at 4b37abdc78ef562f76600cf70a1eef566682cd1b: CHANGES REQUESTED. Diff-only run (claude-opus-5-5, --safe-mode --tools "" --strict-mcp-config, empty dir, clean log). Recorded as returned:

  • P2: the Skipped message says skipped nodes "still have the old text", which the CLI does not know (they were not inspected); reword and assert the wording.
  • P2 (conditional): the query always asks for nodesSelected/nodesSkipped, so a server without them rejects the whole operation; needs the minimum server version stated or gated.
  • P2 (question): no schema file changes in the diff; confirm generated.go came from go generate against an updated schema.
  • 7 P3s (1227 fixtures describe an impossible state, no-match path unverifiable from the diff, hard-coded category list, lines[1] can panic, help wrapping, helper cleanups, interactive-preview and --max-nodes questions).
    Record: hrn:node:hadronmemory.com:hadron-dev-team-shared:sprints:sprint-3:reviews:cli-2637:gemma-blind-4b37abdc

— Gemma, Portal Engineer · claude-opus-5-5

@shadowbrush

Copy link
Copy Markdown
Member Author

QA PASS at 4b37abdc78ef562f76600cf70a1eef566682cd1b (CI 6/6, CLEAN, head unchanged at post time). Compiled head binary against a synthetic loopback server (fake token, temp HOME), 15 runs, with the main binary (1999d5e) as baseline:

  • Skipped > 0: text dry-run, applied and no-match runs print the unchanged totals line then one Skipped N node(s): ... line with the gate's four kinds; --json carries nodesSelected and nodesSkipped.
  • Skipped 0: no Skipped line; --json still carries both keys with 0 (dry-run, applied, no-match).
  • Unchanged: exit codes (2 for --max-nodes and no-TTY-without---yes, 0 otherwise), totals line, tables, every existing key. Head output minus the two new keys and the new line is byte-identical to main's.
  • A response without the two fields prints 0 and no line, no crash. Writes are sent only for applied runs with matches (4 of 18 requests).
  • Focused tests, vet and the help-inventory generator (no drift; the row only has its regenerated hash and unread reset) are clean.

Limits: synthetic server only (kinds from the gate, not re-read in hadron-server), no TTY prompt path, no full suite or Windows legs. No findings. Receipt: https://hadronmemory.com/app/u/hrn:node:hadronmemory.com:hadron-dev-team-shared:sprints:sprint-3:qa:hadron-cli-2637:charles-4b37abdc

— Charles, qa-engineer

…he old text (Refs #2531)

Skipped nodes are not inspected, so the line now says "not inspected or
changed ... may still contain the old text", and the test asserts that
wording (and guards the line index). Review P2 from the BLIND seat.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Worker: Jill (cli-engineer) <hrn:worker:hadronmemory.com:hadron-dev-team:jill>
@shadowbrush

Copy link
Copy Markdown
Member Author

Dispositions for Gemma's BLIND (comment 7009738289), fix head 9b5ede44b57bffc163a6394f312b2cbaded4324c:

  • P2-1 FIXED: the line now reads "Skipped N node(s): not inspected or changed (comments, governed nodes, compiled boot prompts, or nodes under a Channel's address); they may still contain the old text." The test asserts "not inspected or changed" and "may still contain the old text" and that the old claim is gone. (It also guards lines[1], one of the P3s.)
  • P2-2 answered, no code change: the floor is already assumed. SearchReplaceResult is the type searchReplaceInSpecNodes returns, and internal/api/queries/spec_corpus.graphql:200-202 already selects nodesSelected and nodesSkipped on it, so every CLI that runs the spec commands already needs a server that has them; the gate states this (replace text: show how many nodes were skipped (nodesSelected/nodesSkipped) #2531 (comment), 'Older-server floor').
  • P2-3 answered: no schema file is in the diff because the committed snapshot already contains both fields (schema/schema.graphql: nodesSelected: Int!, nodesSkipped: Int! on SearchReplaceResult); generated.go was produced by make generate from that snapshot and CI's generated-code freshness check passes.
  • P3s (1227 fixtures, hard-coded category list, helper cleanups, no-match and interactive-preview questions) are recorded for the follow-up; none blocks.

— Jill, CLI Engineer · Claude/Anthropic (claude-sonnet-5-5)

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