Skip to content

feat(harness-ops): supply the restart consumer's and lanes telemetry's --app-slug from a lane_app_slug userConfig key - #10164

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-8002-40261983768-1
Oct 26, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-8002-40261983768-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #8002

Summary

Opened by the work-resolve-issue lane. The run's own summary:

harness-ops now declares an optional lane_app_slug userConfig key, and the lanes skill passes it as --app-slug '${user_config.lane_app_slug}' to the restart consumer and in its telemetry-upsert guidance, so an operator whose lanes run under a GitHub App token no longer types the slug on every run. restart-consumer.sh and telemetry-upsert.sh read an empty value or an unrendered ${user_config.*} placeholder as no slug, so the always-passed option does nothing when unset. The title and description shape match the lane_app_slug key work-items and source-control already declare.

Not verified

  • restart-consumer.test.sh and telemetry-upsert.test.sh were not run: this lane allows only the named wrappers, and check-affected runs without --tests. The new cases were traced by hand and by the review subagent. Left to the PR's CI, as the issue names.
  • scripts/validate-plugins.sh's full CI run and the check-skills job are left to the PR's CI, as the issue names. Locally, check-affected ran validate-plugins --only harness-ops and it passed, but it skipped its identity-prerequisites drift, native-overlap registry and claude plugin test sub-checks, p
  • The fragment was written by hand in the generator's format, not by new-changelog-fragment: that script refuses because the checkout's HEAD is detached. check-changelog-fragments validates it.

Fix

  • plugins/harness-ops/.claude-plugin/plugin.json: new optional string userConfig key lane_app_slug (title 'Lane GitHub app slug', matching the work-items and source-control declarations).
  • plugins/harness-ops/README.md: lane_app_slug bullet in Configuration (placed above the skill-usage options, so the setup sentence after the list does not read as covering it), the generated options-table row, and 'Three further' corrected to 'These further', since the list already held more than thr
  • plugins/harness-ops/skills/lanes/SKILL.md: the consume-restarts invocation passes --app-slug '${user_config.lane_app_slug}' before $ARGUMENTS (an --app-slug in the arguments still wins); the telemetry-upsert.sh entry says to pass the same flag on every call.
  • plugins/harness-ops/skills/lanes/context/restart-consumer.md: notes that the skill supplies --app-slug from lane_app_slug, and that a schedule printed through the skill holds the slug the option had then, so the schedule must be printed and registered again after the option changes.
  • plugins/harness-ops/skills/lanes/scripts/restart-consumer.sh: --app-slug now accepts an empty value (a bare trailing flag is still refused with exit 3); an unrendered ${user_config.*} placeholder is cleared to no slug before the slug-format check; header updated.
  • plugins/harness-ops/skills/lanes/scripts/telemetry-upsert.sh: an unrendered ${user_config.*} placeholder is cleared to no slug before the slug-format check (empty was already accepted); header updated.
  • plugins/harness-ops/skills/lanes/scripts/restart-consumer.test.sh: placeholder and empty-slug cases (Bot identity read as with no slug, exit 4 with no identity, nothing reaches print-schedule), the --app-slug=<placeholder> form, and a bare trailing --app-slug still refused.
  • plugins/harness-ops/skills/lanes/scripts/telemetry-upsert.test.sh: placeholder and empty-slug cases (not refused, Bot identity read as with no slug, exit 4 and no POST with no identity) and the --app-slug=<placeholder> form; coverage header updated.
  • .changes/harness-ops/feat-8002-lane-app-slug-userconfig-8b3e51d7.md: new minor changelog fragment (Added and Changed).

Verification

The runner ran each check from the base copy against 17c094e:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-changelog-fragments: 'All 7 changelog fragment(s) under .changes/ are valid.'
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/checks/bin/check-affected: first run failed shellcheck (SC2016 on the single-quoted placeholder pattern) and validate-plugins (title casing, a title differing from the sibling plugins, then a description 2 characters over the 300-charac
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/verify/bin/cant-fail-scan --file restart-consumer.test.sh --lines 1006-1032 --check: PASS, no gating findings.
  • /home/runner/work/claude-code-plugins/claude-code-plugins/.lane/verify/bin/cant-fail-scan --file telemetry-upsert.test.sh --lines 345-363 --check: PASS, no gating findings.
  • Fresh-context review subagent over the whole diff: no correctness bugs. Three doc points were fixed: fragment wording overstated the telemetry-upsert change, README bullet placement, and print-schedule writing the slug into the schedule.
  • read https: //code.claude.com/docs/en/plugins/manifest-reference: userConfig option fields (type, title, description required; default optional) and that ${user_config.KEY} is substituted in skill and agent content for non-sensitive values. The page does not say what an unset option without a defaul
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40261983768

Left out: the items under Not verified.

Related

#8002

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 17c094e20df782e4538e68a2dbbbfdddcca64a88: 0 finding(s), 0 as inline comments.

No security issues found in PR #10164.

critical-findings: 0

What I checked. I read the full diff and the PR context. I also checked how other skills in the repo consume ${user_config.*}, and where the README says the option values come from.

  • Manifest plugins/harness-ops/.claude-plugin/plugin.json:
    • manifest userConfig.lane_app_slug: pass. It is a new optional string key with no default, and nothing is removed or changed.
    • The code that reads it only selects which identity (SLUG[bot]) counts as the lanes' own telemetry author. Unset, behaviour is unchanged: the identity resolves from gh api user.
    • It gates, caps and costs nothing, so no guard default is widened. The change adds no hook, command, server, tool grant or external source.
  • Slug handling in restart-consumer.sh and telemetry-upsert.sh:
    • An empty value or an unrendered ${user_config.*} placeholder now clears to no slug, and the ^[a-z0-9][a-z0-9-]*$ check still runs on anything else.
    • The new --app-slug parse in restart-consumer.sh still refuses a bare trailing flag and a following -* token. It accepts an empty value, which cannot reach SLUG[bot] matching.
    • Clearing to no slug falls back to the gh api user identity, and with no identity the scripts still exit 4 and write nothing. An attacker supplying the placeholder text through $ARGUMENTS gains nothing beyond what omitting the flag already gives.
  • Shell quoting in SKILL.md:
    • --app-slug '${user_config.lane_app_slug}' is substituted into a bash block. A slug containing a single quote would break out of the quoting.
    • The value comes only from the operator's own user-scope settings or claude plugin install --config. The repository cannot supply it, so this is self-inflicted at most.
    • The repo already quotes ${user_config.*} values this way in plugins/source-control/skills/setup/SKILL.md. The plugin.json description states the slug grammar, but the manifest does not enforce it.
  • Instruction-surface lens: the SKILL.md and restart-consumer.md edits only add the option. No guardrail is removed or softened. The identity-resolution and fail-closed exit-4 paths are unchanged.
  • Trusted paths: no changed file matches the trusted-path globs.

Spend: none; the change adds no paid resource and no new runs.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 17c094e20df782e4538e68a2dbbbfdddcca64a88: 0 finding(s), 0 as inline comments.

No findings. I read the full diff and the PR context, and checked the changed scripts against the files they call and share helpers with. I ran no tests or scripts, so everything below comes from reading the code. I did not read the repository's REVIEW.md or .claude/rules/ files, and I did not look up a paved-path standards index.

Closing issue #8002, acceptance criteria

  • Manifest and README: plugin.json declares lane_app_slug as an optional string, and the README lists it in the Configuration bullets and the options table. Whether validate-plugins.sh passes is the PR's CI check; I did not run it.
  • SKILL.md invocations: consume-restarts passes --app-slug '${user_config.lane_app_slug}' before $ARGUMENTS. The telemetry-upsert.sh entry tells callers to pass the same flag on every call. Whether check-skills passes is the PR's CI check.
  • Empty or placeholder handling: both scripts clear a ${user_config.*} value to no slug before the slug-format check. restart-consumer.sh also accepts an empty value now. The new guard is equivalent to the old check_optarg except that it allows an empty value, and a bare trailing --app-slug still exits 3. Both test files add empty and placeholder cases, including the --app-slug=<placeholder> form. The test helpers they use exist (GH_USER_FAIL, STUB_USER_FAIL, assert_not_contains). Whether both test files pass is the PR's CI check.
  • Changelog fragment: a harness-ops fragment with bump: minor is present. check-changelog-fragments.sh passing is the PR author's claim; I did not run it.

Plugin manifest checks

  • manifest userConfig lane_app_slug (new field, no default): pass. The lanes skill reads it through the ${user_config.lane_app_slug} substitution.
  • manifest version bump: pass. A new optional option is a minor change, and the fragment says bump: minor.
  • manifest description and keywords: pass. The description and keywords don't name a capability this diff removes or leave out one it adds.
  • manifest options, default change, field removal: not hit.

Behaviour traced

  • Last flag wins: an --app-slug in $ARGUMENTS comes after the skill's flag, so it overrides the option, as the SKILL.md and context text say.
  • Forwarding: restart-consumer.sh forwards the cleaned slug to telemetry-upsert.sh and into print-schedule output. An empty or placeholder slug is not forwarded, which the new tests assert.

Unverified: The PR says the docs don't state what an unset optional userConfig option without a default renders as. The scripts accept an empty value or the literal placeholder; a render form other than those two would exit 3 on the slug-format check. That is unverified, and the PR itself says the docs are silent on it.

Cost: This change spends no prepaid credits and causes no charge.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 17c094e20df782e4538e68a2dbbbfdddcca64a88.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 93251ed Oct 26, 2026
42 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-8002-40261983768-1 branch October 26, 2026 09:53
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.

feat(harness-ops): supply the restart consumer's and lanes telemetry's --app-slug from a lane_app_slug userConfig key

0 participants