feat: migrate skill-channel personal scalars to native userConfig (4 plugins) - #325
Conversation
…plugins) Completes the #315 scalar migrations outside the shared hook-utils wave. These scalars are read by skill-invoked scripts or skill content, where the CLAUDE_PLUGIN_OPTION mirror does not reach, so each value flows through non-sensitive ${user_config.*} substitution in the skill body into an explicit script flag (or, for the two skill-scoped guard hooks, through the mirror directly). - source-control 0.7.0: worktree_stale_days, babysit_self_logins, fetch_logs_max_bytes options. babysit-readiness-gate.sh gains an additive --extra-self flag (preserving the env var's add-to-personal-login semantics; --self stays a full override); fetch-failed-logs.sh gains --max-bytes. Skill bodies carry the substituted values; reference docs point at the flags. - knowledge 0.7.0: yt_dlp_js_runtimes, yt_dlp_cookies_file, yt_dlp_cookies_from_browser, max_concurrent_acquires options wired through new run.mjs launcher flags on the existing library_dir --work-root pattern; the YOUTUBE_* env vars remain only as the launcher-to-child internal interface. Course-platform credentials deliberately stay in shell env until keychain-backed sensitive storage lands on Windows — misfit now documented at the site. - disk-hygiene 0.3.0: disk_hygiene_enabled guard toggle via the mirror. - repo-hygiene 0.2.0: clean_destructive_guard_enabled guard toggle via the mirror. - planning's use_ask_user_question description defect (audit finding) no longer reproduces — fixed upstream before this wave; no change shipped. BREAKING: WORKTREE_STALE_DAYS, BABYSIT_SELF_LOGINS, FETCH_LOGS_MAX_BYTES, HOOK_DISK_HYGIENE_ENABLED, HOOK_CLEAN_DESTRUCTIVE_GUARD_ENABLED, and the four YOUTUBE_* consumer channels are no longer read from consumer-set env. Zero-config behavior unchanged everywhere. Tests: babysit-readiness-gate 47 PASS; repo-hygiene guard 30 PASS; disk-hygiene pytest OK; knowledge vitest 33/33 on affected files + tsc clean; fetch-failed-logs suite requires zip (absent locally — CI covers); manifests + catalog validate; markdownlint clean on all edited files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b33330b4a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (Object.keys(overlay).length === 0) { | ||
| return baseEnv; | ||
| } | ||
| return { ...baseEnv, YOUTUBE_WORK_ROOT: workRoot }; | ||
| return { ...baseEnv, ...overlay }; |
There was a problem hiding this comment.
Strip retired YouTube env vars before spawning
With this merge the child still inherits the caller's full shell environment, while resolveYtDlpAuthArgs() and resolveMaxConcurrentAcquires() continue to read YOUTUBE_YT_DLP_* and YOUTUBE_MAX_CONCURRENT_ACQUIRES. In any install where a user still has one of those retired variables exported and leaves the matching userConfig option at its default (or only passes a different launcher flag), the migrated launcher silently keeps applying the stale shell value instead of the plugin option/default. Sanitize those retired names out of baseEnv before applying the launcher overlay.
Useful? React with 👍 / 👎.
…ave) Resolve the plugin.json / CHANGELOG / README conflicts from main's #325 (skill-channel userConfig migration); rebump source-control to 0.8.0 (main shipped 0.7.0). - Prefix all 15 babysit userConfig keys `babysit_*` to match #325's feature-prefixed convention; `self_logins` unifies with #325's `babysit_self_logins`. Keep main's `worktree_stale_days` and `fetch_logs_max_bytes`. - Additive self-identity across every consumer: `--extra-self` (gate, from #325), `--author @me,<extras>` (discovery), `--self-logins @me,<extras>` (merge gate) each fold `babysit_self_logins` onto your gh login. - Fix F4: review-trigger candidacy no longer stalls when no CI gateway context is configured (ci_gateway_green true when unset). - Fix F5: pr_queue_snapshot stores the resolved --state-dir so a `~`-prefixed dir is shared with the other state CLIs. - Fix F6: babysit_merge resolves `@me` in --self-logins (after the argument-shape refusals; fail-closed if unresolvable) so own PRs are exempt from the unprotected-base hold. Reported by Codex on #322. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds opt-in `worker` and `autopilot` tiers to `/source-control:babysit-prs` on
top of the safe default, backed by a stdlib-only decomposed Python engine and a
deterministic, head-SHA-pinned merge gate (mergeStateStatus == CLEAN cross-check,
never `--admin`, never force-push). State root moves from `CODEX_HOME` to
`${CLAUDE_PLUGIN_DATA}`; 15 `babysit_`-prefixed `userConfig` keys replace the
`BABYSIT_*` env seams; `bin/` wrappers expose the guarded mutations as
auto-mode-durable bare commands. Self-identity is additive across discovery,
readiness gate, and merge gate, reconciled with #325's userConfig wave
(`babysit_self_logins` composes on your `gh api user` login).
Breaking: the safe default narrows discovery to your own PRs under the current
repo's owner and runs Python-free; `worker`/`autopilot` widen scope explicitly
and declare Python 3.11+.
Part of #315 (userConfig wave). No linked issue closes with this PR — closing #315 is gated on the hook-channel PR #323 landing and the wave acceptance sweep.
What
Completes the #315 scalar migrations outside the shared hook-utils wave (#323). These scalars are read by skill-invoked scripts or skill content, where the
CLAUDE_PLUGIN_OPTION_*mirror does not reach — each value now flows through non-sensitive${user_config.*}substitution in the skill body into an explicit script flag, or (for the two skill-scoped guard hooks, which ARE hook processes) through the mirror directly.Per plugin
worktree_stale_days(default 14),babysit_self_logins(csv, default empty),fetch_logs_max_bytes(default 52428800).babysit-readiness-gate.shgains an additive--extra-selfflag — preserving the retired env var's add-to-personal-login semantics; the pre-existing--selffull-override contract is unchanged.fetch-failed-logs.shgains--max-bytes. Skill bodies carry the substituted values (reference/context files are not substituted, so the values enter context via SKILL.md); every instruction includes the unexpanded-token fallback.yt_dlp_js_runtimes(default "node"),yt_dlp_cookies_file,yt_dlp_cookies_from_browser,max_concurrent_acquires(default 1, max 3), wired through newrun.mjslauncher flags on the plugin's existinglibrary_dir→--work-rootprecedent; theYOUTUBE_*env vars remain only as the launcher-to-child internal interface. Course-platform credentials (TEACHABLE_*/COURSE_*) deliberately stay in shell env —sensitive: truepersists as plaintext in~/.claude/.credentials.jsonon Windows — and that misfit is now documented at the site (the audit's dim-6 requirement).disk_hygiene_enabled(default true) read by the skill-scoped guard viaCLAUDE_PLUGIN_OPTION_DISK_HYGIENE_ENABLED.clean_destructive_guard_enabled(default true) viaCLAUDE_PLUGIN_OPTION_CLEAN_DESTRUCTIVE_GUARD_ENABLED.use_ask_user_questiondescription-copy defect no longer reproduces (fixed upstream before this wave); no change shipped.BREAKING (consumer-visible):
WORKTREE_STALE_DAYS,BABYSIT_SELF_LOGINS,FETCH_LOGS_MAX_BYTES,HOOK_DISK_HYGIENE_ENABLED,HOOK_CLEAN_DESTRUCTIVE_GUARD_ENABLED, and the fourYOUTUBE_*consumer channels are no longer read from consumer-set env; re-express non-default values as the matching userConfig options. Zero-config behavior unchanged everywhere.FETCH_LOGS_SCRATCH/FETCH_LOGS_REPOremain env (out of #315 scope).Verification
--extra-selfpath); repo-hygiene guard suite 30 PASS; disk-hygiene pytest OK; knowledge vitest 33/33 on the four affected files +tsc --noEmitclean.zip(absent on this machine — it self-skips; CI runs it). The--max-byteschange is a one-line default-substitution swap plus a validated flag parse.scripts/validate-plugins.sh(manifests + catalog, strict) andnode scripts/generate-catalog.mjs --checkgreen; markdownlint 0 errors on every edited file; residual grep confirms no consumer-facing doc still instructs setting a retired env var.package-lock.jsonverified pristine (a subagent's localnpm installwas reverted before commit).Related
🤖 Generated with Claude Code