Skip to content

update ignores a stale .claude at the current version; duplicate check names share a log - #14

Merged
github-actions[bot] merged 2 commits into
mainfrom
improve/update-rerender-dup-checks
Oct 29, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
improve/update-rerender-dup-checks

Conversation

@zolotarev

Copy link
Copy Markdown
Owner

Friction

  • after the dpcli submodule was moved by hand to a commit with the current VERSION, dpcli update said "up to date" and left .claude/ (agents, process description, hooks) stale — a project would never get the new hook or rules;
  • since v21 logs and results are per check name, but task new|set accepted two checks with the same name, which then overwrite each other (reviewer nit on Reviewing work in the main copy: missing copy in brief, scope skipped, stale logs #12).

Change

  • update: when the version is current, init --check; stale → init + commit; still stale after init (hand edits) → one line pointing to init --check instead of claiming a re-render on every run.
  • task new|set: duplicate check names are rejected with the fix (--drop-check).

Split out of #13 as asked. Tests: test_update (lost rendered file comes back and is committed), test_main_copy_review (duplicates).

…heck names rejected

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zolotarev zolotarev added the feedback Friction reported from real use label Oct 29, 2026
@github-actions

Copy link
Copy Markdown

VERDICT: rework

  • Real friction, version bumped, CHANGELOG present, English, anonymized, no budget change. The duplicate-check validation (task.py:154) is correct (runs after --drop-check, so --drop-check X --check X still replaces) and tested.
  • update.py (current-version branch): if init fails (h is None) nothing is reported and it falls through to "up to date". The stale .claude is hidden again, which is the bug this PR fixes. Return a line like the target branch does: "init failed — fix and run init".
  • render_and_commit drops init's stderr. The old message included short(r.stderr.strip(), 200), and the new "init failed" line has no cause. Keep the reason: return it with the failure, or have the caller print it.
  • Untested paths: "stays stale after init (edited by hand?)" and the init failure on a current version. The PR body claims the hand-edit behaviour, so add a test for it (e.g. a hand-edited generated file that init can't reconcile, or a stubbed failing init) and one for the failure line.
  • Nit: the init --check subprocess now runs on every update at the current version, and the "stays stale" line repeats on every run, including --auto. Acceptable if it stays once-a-day, but say so in the code or CHANGELOG. The CHANGELOG wording "instead of re-rendering on every run" is inexact: init still re-runs each time.

… hand edits and init failure

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

VERDICT: accept

  • Solves two observed frictions (submodule moved by hand → stale .claude/; duplicate check names overwriting per-name logs since v21). Both come from use and the Reviewing work in the main copy: missing copy in brief, scope skipped, stale logs #12 review nit.
  • Correct: render_and_commit is a clean extraction of the old inline code, and the stale-after-init case reports once instead of looping. validate_checks rejects duplicates with the fix in the message.
  • Tested: the three update cases (restored file committed, hand edit reported, init failure with cause) plus the duplicate-name case. I could not run them locally (sandbox), so I rely on CI being green.
  • Process: VERSION 23 and a CHANGELOG line are present, with no prompt, template or budget growth. English throughout and nothing project-specific.
  • Nit: with --auto, a hand-edited stale .claude/ prints "stays stale" once per day, not silently. That is probably fine as a nudge, but it is noise if the edit is intentional.
  • Nit: every non---auto update at the current version now spawns init --check. It is cheap, but it is a new subprocess on the common path.

@github-actions github-actions Bot removed the rework label Oct 29, 2026
@github-actions
github-actions Bot merged commit 620a27c into main Oct 29, 2026
3 checks passed
@github-actions
github-actions Bot deleted the improve/update-rerender-dup-checks branch October 29, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feedback Friction reported from real use

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant