Skip to content

fix(setup): treat method:local as adopted without drift in drift-check - #1614

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/drift-check-local-method
Oct 13, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/drift-check-local-method

Conversation

@potiuk

@potiuk potiuk commented Oct 13, 2026

Copy link
Copy Markdown
Member

Summary

  • The session-start drift-check mod (plugins/magpie-setup/hooks/drift-check.ts, from feat(setup): add zero-token setup drift check Claude Code mod (part of #1497) #1552) only recognised the marketplace and snapshot (git-tag / git-branch / svn-zip) lock methods.
    The framework checkout's own self-adoption lock (method: local) fell through to "Malformed .apache-magpie.lock (unknown or missing method). Run /magpie-setup upgrade to repair." on every session — a false alarm pointing at an upgrade that cannot fix it.
  • A local adoption links the in-tree skills/ source, so there is no snapshot or floor that can drift.
    The mod now reports it as adopted with no drift, matching setup-preflight's existing LOCAL_METHOD handling (tools/setup-preflight/src/setup_preflight/core.py).

Type of change

  • Skill change (.claude/skills/<name>/) — eval fixtures updated below
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators)
  • Other: Claude Code mod (magpie-setup drift-check hook)

Test plan

  • claude plugin test plugins/magpie-setup — 10/10 pass, including the new returns false drift for local self-adoption method regression test
  • claude plugin validate --strict plugins/magpie-setup passes
  • prek run --all-files passes apart from one local-only failure (a stale, untracked stack-review/tests/ directory holding just __pycache__, which the unittest hook finds empty; not in git, so CI does not see it)
  • Confirmed the mod's YAML-like parser reads method: local correctly from the real lock, including its comments and nested reconciled: block

RFC-AI-0004 compliance

No principles touched — read-only check, no new mutation, host access, or LLM hop.

Linked issues

Refs #1497, #1552


Generated-by: Claude Code (Opus 5.5)

🤖 Generated with Claude Code

The session-start drift check only knew the marketplace and snapshot
methods, so the framework checkout's own self-adoption lock
(`method: local`) fell through to "Malformed .apache-magpie.lock
(unknown or missing method)" on every session, pointing at an
upgrade that cannot fix it.

A local adoption links the in-tree skills/ source, so there is no
snapshot or floor to drift; report it as adopted with no drift,
matching setup-preflight's LOCAL_METHOD handling.

Generated-by: Claude Code (Opus 5.5)
@potiuk potiuk added family:setup setup-* skills capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) labels Oct 13, 2026
@potiuk
potiuk merged commit 4ff0cab into apache:main Oct 13, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) family:setup setup-* skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant