Skip to content

fix(user-experience): reject a path with a dot-leading segment anywhere, not only first - #8928

Merged
kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-8572-39669732067-1
Oct 21, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-8572-39669732067-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #8572

Summary

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

The team-file path guard in detect.mjs now rejects an output_home or research_paths entry when any segment starts with a dot, as written and as resolved. Tests cover docs/.env, docs/.claude/x, a/b/.git, rootlink/docs/.claude and a kept nested path.

Not verified

  • detect.test.mjs was not run here: the sandbox allows only the named wrappers, so node could not be invoked. The new and existing tests are unexecuted until CI's test-bash runs.
  • The changelog fragment was written by hand because HEAD is detached and new-changelog-fragment needs a branch; check-changelog-fragments accepts it. No commit was made, per the lane instructions.
  • Fresh-context review subagent, build and lint steps were not run separately.

Fix

  • plugins/user-experience/scripts/detect.mjs: reserved() checks every path segment instead of the first; comment states the any-segment rule
  • plugins/user-experience/tests/detect.test.mjs: tests for docs/.env, docs/.claude/x and a/b/.git on both keys with the dot-path warning, rootlink/docs/.claude through a root symlink, and a kept docs/research/notes
  • .changes/user-experience/issue-8572-a1b2c3d4.md: user-experience patch fragment

Verification

The runner ran each check from the base copy against b8e107d:

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

The run reports:

Left out: the items under Not verified.

Related

#8572

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

Copy link
Copy Markdown
Contributor

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

Security review: PR #8928 at b8e107d

No security findings.

The PR changes one predicate in plugins/user-experience/scripts/detect.mjs. reserved used to reject a team-file path only when its first segment started with a dot. It now rejects the path when any segment does. The rest of the PR is a changelog fragment and tests.

  • Direction of the change: the change narrows what a team file can set for output_home and research_paths, so it adds a restriction and removes none. The instruction-surface lens found no deleted or softened guardrail.
  • Symlink check: reserved is also applied to the symlink-resolved path in resolvesReserved. A symlink to a dot location is still caught, now at any depth. The new rootlink/docs/.claude test covers a missing tail.
  • Over-matching: a segment named .. also starts with a dot, so an escaping path is dropped by reserved as well as by the inside check. The result is still a refusal.
  • Pre-existing, not reported: I did not trace how inside normalizes docs/../.env before reserved runs. That code is not in the diff.
  • Register not consulted: I did not read docs/conventions/instruction-exception-register/README.md. The diff does not delete or soften any standing instruction, so I judged the protected-class list unnecessary.

@github-actions

Copy link
Copy Markdown
Contributor

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

No findings on head b8e107d.

What I checked

  • reserved in plugins/user-experience/scripts/detect.mjs:351 now tests every path segment. It is used as written (usable) and as resolved (resolvesReserved). output_home, research_paths and persona_paths all go through usable, so each gets the any-segment rule. persona_paths is outside the issue's stated scope, but sharing usable keeps the three keys consistent.
  • The warning text and quote use JSON.stringify, so the new tests' JSON.stringify(value) and "starts with a dot" filters match. The root-symlink case keeps the existing rootlink/... test pattern, with rootlink/docs/.claude added.
  • I found no existing test that expects a nested dot-segment path to be kept, so the stricter rule shouldn't break one. I read the tests but did not run them.
  • Closing issue fix(user-experience): reject a path with a dot-leading segment anywhere, not only first #8572: the new tests cover each acceptance criterion by reading, and the fragment is a single user-experience patch entry. I did not run check-changelog-fragments, node, or any test myself.

Author-claimed and unverified by me: the PR body says detect.test.mjs was not run locally and the changelog check passed. CI's test-bash is the first real run of the new and existing tests.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: risk HIGH at head b8e107d60f5f61f434b8d97cea4c3ed554b64252. Only LOW merges without a human. A floor path or capability change holds it: a human merges it in person, never an agent or a lane.

HIGH high-path:plugins/**/scripts/**: plugins/user-experience/scripts/detect.mjs
HIGH high-path:plugins/*/scripts/**: plugins/user-experience/scripts/detect.mjs

This refusal has stood unchanged at this head, so a person is needed: the pr-merge lane added the human-gated label.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Oct 21, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 20d4299 Oct 21, 2026
43 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-8572-39669732067-1 branch October 21, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(user-experience): reject a path with a dot-leading segment anywhere, not only first

1 participant