Skip to content

feat: pr-watch scopes --all-open to own PRs, sends only changed lines; YT_BIN for bins (#85) - #89

Merged
lx-0 merged 6 commits into
mainfrom
feat/85-pr-watch-scope
Nov 15, 2026
Merged

lx-0 merged 6 commits into
mainfrom
feat/85-pr-watch-scope

Conversation

@lx-0

@lx-0 lx-0 commented Nov 15, 2026

Copy link
Copy Markdown
Member

What changes

PR watch (issue #85):

  • register --all-open registers only open PRs whose author is the gh login. --author <login>[,<login>] adds authors. Drafts and labels that read do-not-merge (any case, spaces/underscores, also do-not-merge/hold) are skipped unless --include-drafts / --include-labelled. Every skipped PR is named with its reason. register --pr N is unchanged.
  • The UserPromptSubmit block lists only the PR lines that changed since the last injection, plus - N unchanged. The fingerprint is now kept per line (an old whole-block fingerprint reads as "show everything once").
  • A PR that has sat in action_required for 24 h with no head or status change gets one line suggesting ytstack-pr-watch pause --repo R --pr N. It shows once, when the line crosses 24 h. Paused PRs never get it.
  • status shows only the current session and the origin repo of the working directory, and prints the scope it used. --session/--repo override it, --all shows everything. health is always printed whole, so the coordinate preamble's heartbeat read still works.

Bins (issue #85, "bins not on PATH"):

  • The coordinate preamble prints YT_BIN=<canonical bin dir>. The skill now says to run every bin as "$YT_BIN/ytstack-<name>", with the value set in the same command. coordinate goes to 0.5.1, and its --all-open sentence matches the new default.
  • SessionStart adds YT_BIN=<dir> on every source (resume and compaction too), but only when it still fits under the injection guard. This repo's injection is within about 50 characters of the guard when the Next action is long, so the line gives way rather than cost that excerpt.

Decisions

DECISIONS 2026-11-15 "PR watch bulk registration takes only your own ready PRs; bins are called through YT_BIN (issue #85)":

  • Author filter rather than "everything + pause" or branch bindings. Bindings would miss exactly the PRs that --all-open exists for.
  • YT_BIN rather than a ~/.ytstack/bin shim. A shim is an installed file in the user's home and points at whatever version was active last. ytstack does not edit PATH or host settings.
  • Known limit: a session started before an update runs the old hooks. After an update, the path is renewed by reloading the skill (the version notice asks for that), not by SessionStart.

Verification

  • python3 bin/ytstack-check: OK (with 9 warning[s]), exit 2 (warnings only; none come from this change)
  • bash tests/run-all.sh: exit 0, 3315 passed, 0 failed across all suites, including pr-watch (60 shell cases plus 93 engine unit tests), skill-preambles 664, session-notices 63 and hooks-readonly 71
  • New tests: tests/pr_watch/test_scope.py covers changed lines, the pause hint and status scope. test_register_all.py covers the author, draft and label filters. gh is always mocked (github.login), and test_session_spelling.py now mocks it too.

Closes #85

🤖 Generated with Claude Code

lx-0 and others added 3 commits November 15, 2026 15:06
…ines, scoped status (#85)

register --all-open registers only PRs of the gh login; --author widens,
drafts and do-not-merge labels are skipped unless --include-drafts /
--include-labelled. The prompt block lists changed lines plus 'N unchanged';
a PR action_required unchanged for 24 h gets one pause suggestion. status
shows the current session and repository unless --all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…inate runs bins through it (#85)

The coordinator called bins by a versioned cache path and kept it after an
update (exit 127). The coordinate preamble prints YT_BIN=<canonical bin dir>
and the skill runs bins as "$YT_BIN/ytstack-<name>". SessionStart appends the
line on every source only where it fits under the injection guard, so it never
costs the Next action excerpt. coordinate's --all-open sentence follows the new
own-PR default. coordinate 0.5.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T14:09:21.426448Z d7c64f3 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7c64f3d29

ℹ️ 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".

Comment thread tools/pr-watch/prwatch/claude.py Resolved
lx-0 and others added 3 commits November 15, 2026 15:34
… pause, login fallback (PR #89 review)

- A watch of the last block that closed gets one 'closed (merged)' / 'closed'
  line and leaves the unchanged count (a merge without a bot finding had no
  report at all).
- The 24 h pause hint comes once per stretch (meta pause-hint:<session>, not
  reset on SessionStart), not again when only the findings change; NULL
  changed_at counts as long ago.
- --all-open pauses watches of this session the filter now skips; a failed
  login lookup errors with a pointer to --author, or uses only --author with
  a warning; labels match 'do not merge' / 'dnm' as words; --author ignores a
  [bot] suffix; the filter flags need --all-open.
- status compares the repository without case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… review)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	.ytstack/DECISIONS.md
#	CHANGELOG.md
@lx-0
lx-0 merged commit 9b50bbe into main Nov 15, 2026
4 checks passed
@lx-0
lx-0 deleted the feat/85-pr-watch-scope branch November 15, 2026 17:18
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.

pr-watch: --all-open adopts foreign PRs and floods the prompt; bins called by versioned path

1 participant