forked from bchanot/claude
chore(memory): job8 C — darwin-skill reinstalled full pinned tree, detached HEAD
BDR-058 + LRN-109. Root cause of the "referenced files absent" finding: the skills CLI's skillPath only fetches SKILL.md, never sibling references/scripts/templates dirs. Upstream HEAD matched the already- recorded lockfile hash exactly (no drift, no tamper) — reinstalled the full tree at that pinned SHA, detached HEAD so nothing can silently advance. Reinstall happened outside this repo (~/.agents); this commit is the only repo-side record. Backup of the old single-file dir kept.
This commit is contained in:
@@ -78,6 +78,7 @@ rules:
|
||||
| BDR-055 | 2026-07-07 | job5: delete memory-commit/doc-commit `pending` verbs — v2 hook rejected (BDR-037), J4-17 closed MOOT | accepted |
|
||||
| BDR-056 | 2026-07-07 | job6: deps policy = latest gated by integration, not KEEP-PINNED by default | accepted |
|
||||
| BDR-057 | 2026-07-07 | job7: secrets by reference not by value; redact at capture, not just at rest | accepted |
|
||||
| BDR-058 | 2026-07-07 | job8: darwin-skill reinstall full pinned tree, detached HEAD (skills CLI single-file-fetch gap) | accepted |
|
||||
|
||||
---
|
||||
|
||||
@@ -889,3 +890,12 @@ rules:
|
||||
- **Alternatives rejected**: scrub-only (chosen as the fallback in job7's own instructions if reference-by-value support were absent) — verified Claude Code DOES support `${VAR}` expansion in `mcpServers` config (user + project scope, `env`/`command`/`args`/`url`/`headers` fields — code.claude.com/docs/en/mcp.md), so the reference form was available and preferred; global `export MAGIC_API_KEY` in `~/.bashrc` — works but broadens the secret's exposure to every subprocess of every shell session, defeating the point of the redaction hook (rejected by user in favor of the scoped wrapper).
|
||||
- **Reference**: `lib/toggle-external.sh:191-192`, `hooks/rtk-rewrite.sh`, `README.md` "Adding an MCP server that needs a secret", `.gitleaks.toml`, `lib/gitflow.sh` `_gitflow_emit_pre_commit`, `Makefile` `scan-secrets`; commits `b9300c3`/`3340c7d`/`17bdd08`/`5d5b386`. Linked to [[BDR-026]] (canonical vault this closes a leak vector against), [[LRN-108]] (the `claude mcp add --env` trap).
|
||||
- **Caveat — contradicts job6's own finding same day**: job6's journal (2026-07-07, earlier same day) states "`${VAR}` env-expansion confirmed unsupported at `~/.claude.json` user scope after 2 rounds of sourced doc lookup". job7's doc lookup (claude-code-guide agent, same day) found it IS supported at user scope, citing code.claude.com/docs/en/mcp.md + a v2.1.161 changelog entry. Not reconciled — could be a version bump between the two lookups, or job6's research being wrong. The `${MAGIC_API_KEY}` rewrite is live (`claude mcp list` recognizes the reference and reports the var missing, which requires the CLI to have at least PARSED the `${...}` syntax) but full end-to-end confirmation (restart terminal + Claude Code, verify magic MCP reconnects) is still a residual the user needs to do — see BDR-057's own commit message.
|
||||
|
||||
## BDR-058 — job8: darwin-skill reinstall full pinned tree, detached HEAD
|
||||
|
||||
- **Date**: 2026-07-07
|
||||
- **Status**: accepted
|
||||
- **Decision**: darwin-skill non-functional past SKILL.md text — `references/`, `scripts/`, `templates/` absent, referenced but never fetched. Root cause: `~/.agents/.skill-lock.json` `skillPath: "SKILL.md"` — installer (`skills` CLI, vercel-labs/skills) fetches ONLY that one file, not sibling dirs. Upstream repo HEAD (`7c7b7909b630dc3b5cbb91bd4bcb1b10bfb1f894`) matches lockfile hash exactly — zero drift, zero tamper, SKILL.md byte-identical old vs new. Fix: cloned upstream at that SHA, copied full tree into `~/.agents/skills/darwin-skill/`, verified all 5 referenced paths present, HEAD detached (no branch tracking, no silent advance on a stray `git pull`). Old single-file dir backed up to `~/.agents/skills/.job8-backups/darwin-skill.single-file.<ts>` first.
|
||||
- **Why**: user picked reinstall-pinned over remove/keep-broken (job8 audit §4 item 4, 3-way choice). Unverifiable skill can't be trusted; user wants the optimizer kept, not removed.
|
||||
- **Alternatives rejected**: remove entry (kills wanted function); keep as-is (fails job8's own audit bar — unverifiable); flat-copy without `.git` (matches other 34 dormant skills' convention but drops verifiable pin — kept `.git` detached instead, darwin-skill now 2nd real SHA-pin in the whole trust chain after gstack, job8 report §5).
|
||||
- **Reference**: `~/.agents/skills/darwin-skill/` (detached HEAD `7c7b790`), `~/.agents/.skill-lock.json` (untouched, hash still accurate), backup at `~/.agents/skills/.job8-backups/`. Outside this repo — no commit here covers the file placement itself, this entry is the record. Git-commit whole-`.claude/skills`-tree scope (job8 C.2, `SKILL.md:115/201`) NOT restricted — 3rd-party pinned code, patching it breaks the pin; accepted as documented risk, human-checkpoint-gated per job8 report. Linked to [[LRN-109]].
|
||||
|
||||
@@ -122,6 +122,7 @@ rules:
|
||||
| LRN-102 | 2026-07-05 | deliverable text placed BEFORE a tool call may never render — only the turn's FINAL text is guaranteed displayed; a checklist printed above AskUserQuestion was invisible to the user | any flow whose deliverable is conversational text (checklist, commands, report): end the turn with it, blocking questions come before, never after |
|
||||
| LRN-105 | 2026-07-06 | explorer subagent ran a build tool (`graphify .`) mid read-only audit despite prose instructions to only Read/Grep/Bash-read — the runtime observed a config-protection sentinel deny message and self-corrected only after an explicit main-session correction, not from the original prompt | dispatching any "read-only audit" subagent whose toolset includes Bash: state "do not execute build/generator/mutating commands" explicitly, don't rely on "read-only" framing alone to constrain tool CHOICE |
|
||||
| LRN-106 | 2026-07-06 | job3-B1 froze a fixture + repointed run-reconcile.sh's T2 off the live registry, declared "unblocked", 20/20 green — job4 (next audit, same file, same day) found T3+T5 in the SAME FILE still read the live registry, same fragility, untouched | fixing one instance of a "reads live state it shouldn't" finding: grep the WHOLE file (not just the cited line) for the same pattern before declaring the class closed |
|
||||
| LRN-109 | 2026-07-07 | job8: `skills` CLI (vercel-labs/skills) fetches only `skillPath` (often just SKILL.md), not sibling refs/scripts/templates the skill text references — darwin-skill install gap, not drift/tamper | installing/auditing any skill via the `skills` CLI whose SKILL.md references relative paths — verify those paths exist post-install, don't trust `skillFolderHash` alone |
|
||||
|
||||
---
|
||||
|
||||
@@ -1102,3 +1103,9 @@ rules:
|
||||
- **context**: `lib/toggle-external.sh:191` had this exact double-quoted form since BDR-025/026; it materialized the key into `~/.claude.json` (2026-07-02 incident) and kept re-leaking into every native auto-backup taken afterward (5-file rotating ring buffer, plaintext each time) until fixed at the source.
|
||||
- **future application**: adding ANY MCP server with a secret via `claude mcp add --env`, single-quote the value using `${VAR}` syntax, never double-quote/bash-expand it. The var still has to exist in the environment of the process that starts `claude` — don't solve that with a blanket `export` in `~/.bashrc` (broadens exposure to every subprocess); scope it with a wrapper function that sources the secret into a subshell before `exec`ing the real binary (see `~/.bashrc`'s `claude()` function, [[BDR-057]]).
|
||||
- **cousin**: [[BDR-026]] (canonical vault + copies), [[BDR-057]] (secrets-by-reference decision this trap motivated), [[LRN-107]] (same job family, don't-copy-the-value discipline).
|
||||
|
||||
## LRN-109 — `skills` CLI (vercel-labs/skills) fetches only `skillPath`, not sibling refs/scripts/templates
|
||||
|
||||
- **context**: job8 audit flagged darwin-skill NOT-CLEAN — SKILL.md references `references/*.md`, `scripts/*.mjs`, `templates/*.html`, all absent on disk. Traced to `~/.agents/.skill-lock.json`: `skillPath: "SKILL.md"` — installer fetched that ONE file, never the sibling dirs the skill text points to. Upstream repo (public clone, verified) had them all at the exact commit already recorded (`skillFolderHash` matches) — not drift, an installer-scope gap.
|
||||
- **future application**: any skill installed via `skills` CLI whose SKILL.md references relative paths needs a post-install check those paths exist on disk — `skillFolderHash` only hashes what WAS fetched, says nothing about what's missing. If absent: clone source repo at the recorded hash, copy full tree in, keep `.git` detached (cheap real pin, beats trusting the CLI's opaque hash alone).
|
||||
- **cousin**: [[BDR-058]] (this job's fix), darwin-skill's OVERSCOPED git-commit finding (job8 report — 3rd-party code, not patched, accepted risk under human-checkpoint gating, twin of [[LRN-105]]'s no-execute mandate for OUR read-only audits).
|
||||
|
||||
Reference in New Issue
Block a user