Skip to content

feat(review): add labeling agent in Claude Managed Agents - #5407

Draft
purp wants to merge 4 commits into
NVIDIA:mainfrom
purp:feat/5276-labeling-agent-runtime/purp
Draft

purp wants to merge 4 commits into
NVIDIA:mainfrom
purp:feat/5276-labeling-agent-runtime/purp

Conversation

@purp

@purp purp commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add the runtime foundation for automatic labeling of accepted issues and PRs: a bounded managed classifier adapter and deterministic invocation selection that reuse the standalone /label-issue contract. This draft installs no automatic labeling workflow and performs no label writes.

Related Issue

Closes #5406. Starts Part 3 of #5276; this PR does not close the overall tracker.

Based on main after #5260 and #5355 merged; no temporary tracking branch is required.

Integration order: #5260 supplies accepted-work policy and opening-time PR acceptance labeling; #5355 supplies the standalone skill and migration helpers; #5151 supplies label/routing preparation before observed manual migration; automatic acceptance-triggered labeling follows those observed runs.

Changes

  • Add a version-pinned CMA session adapter with request preview, configurable budget/deadline, completion validation, bounded event pagination, and failure recovery. The classifier receives prepared evidence and trusted instructions with tools/MCP disabled and no supplied GitHub credentials.
  • Select explicit issue/PR acceptance events and authorized human PR-comment/manual invocations with force support. Opening/reopening alone does not dispatch classification.
  • Leave acceptance, evidence expansion, semantic validation, coordinated writes, checkpoints, and local ambiguity reporting in the shared skill/helper boundary.
  • Register 30 offline tests in mise/branch CI and protect the runtime files with CODEOWNERS.

Before activation: connect #5355's actual interfaces, provision and verify the CMA configuration, coordinate execution per item across entry points, and observe end-to-end runs. Hook #5260's successful acceptance-label write explicitly, including drafts and independently of subsequent reviewer-routing failure: a GITHUB_TOKEN label write does not trigger another workflow. Recheck current acceptance rather than trusting a historical label.

Release Notes

Testing

  • Rebased onto main after feat(skills): extract issue and PR labeling #5355 merged; all three runtime commits preserved. The combined label-related offline suite passes 244 tests; the main-relative diff has no whitespace errors.
  • 30 offline Python tests pass using uv run --no-project --python /usr/bin/python3 --offline python -m unittest discover -s tasks/scripts -p '*label*test.py'.
  • Python syntax, TOML task registration, and complete staged git diff --check pass.
  • Scope and documentation review; remove the unused serialization wrapper and stale ambiguity-comment guidance.
  • Ruff/formatting and the mise wrapper: tools were unavailable and downloads were blocked. Markdownlint and Actionlint were not run.
  • Live CMA smoke test and end-to-end labeling: pending configuration and shared-helper integration. No live sessions, label mutations, or automatic dispatch were performed.
  • Unit tests added/updated.
  • E2E tests added/updated (not applicable to the offline foundation).

Checklist

  • Follows Conventional Commits.
  • Commits are signed off (DCO).
  • Internal integration documentation updated.

@copy-pr-bot

copy-pr-bot Bot commented Nov 9, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@purp purp changed the title feat(review): add managed labeling runtime foundation feat(review): automatically label issues and PRs using Claude Managed Agents Nov 9, 2026
@purp purp changed the title feat(review): automatically label issues and PRs using Claude Managed Agents feat(review): tools for labeling using Claude Managed Agents Nov 9, 2026
@purp purp changed the title feat(review): tools for labeling using Claude Managed Agents feat(review): tools for labeling agent Nov 10, 2026
@purp purp changed the title feat(review): tools for labeling agent feat(review): add labeling agent in Claude Managed Agents Nov 10, 2026
@purp
purp force-pushed the feat/5276-labeling-agent-runtime/purp branch from 64ff126 to 103e234 Compare November 11, 2026 18:56
@purp
purp changed the base branch from main to chore/5276-base-5355/purp November 11, 2026 18:56
@purp
purp force-pushed the chore/5276-base-5355/purp branch from 6c3bf15 to 29b4687 Compare November 11, 2026 21:58
@purp
purp force-pushed the feat/5276-labeling-agent-runtime/purp branch 2 times, most recently from f0ef3dd to b2ef00f Compare November 12, 2026 13:16
@purp
purp changed the base branch from chore/5276-base-5355/purp to main November 12, 2026 13:16
@purp purp added area:build CI/CD workflows, releases, build targets, packaging, and artifact publication. topic:dx Making OpenShell easy to contribute to for humans and agents. labels Nov 12, 2026
@purp

purp commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator Author

Migration experiment: runtime follow-up

Observed Sonnet/Haiku comparison should inform this adapter and #5411's integration:

This was fixed-evidence, tool-free Claude CLI testing, not validation of CMA execution. No label writes occurred. #5413 owns reproducible quality/cost/latency evaluation.

purp added 4 commits November 14, 2026 23:47
Signed-off-by: Jim Meyer <jimeyer@nvidia.com>
The README links to NVIDIA#5276 for activation prerequisites and to the
modules for completion and invocation behavior instead of restating
them. Budget and timeout defaults live in one constant each and
appear in --help. A shared helper validates item numbers, and one
discover command runs both test files.

Signed-off-by: Jim Meyer <jimeyer@nvidia.com>
Apply ruff format, fix RUF021, B023, and RUF005, and add SPDX headers
so the scripts pass python:format:check, python:lint, and
license:check.

Signed-off-by: Jim Meyer <jimeyer@nvidia.com>
Signed-off-by: Jim Meyer <jimeyer@nvidia.com>
@purp
purp force-pushed the feat/5276-labeling-agent-runtime/purp branch from b2ef00f to 3876a8a Compare November 14, 2026 23:52

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:build CI/CD workflows, releases, build targets, packaging, and artifact publication. topic:dx Making OpenShell easy to contribute to for humans and agents.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(review): add managed labeling runtime foundation

1 participant