Skip to content

fix: enforce PR action modes from intent#148

Merged
ecarreras merged 2 commits into
pilipilisbot:mainfrom
gisce:feat/pr-action-modes
Jul 3, 2026
Merged

fix: enforce PR action modes from intent#148
ecarreras merged 2 commits into
pilipilisbot:mainfrom
gisce:feat/pr-action-modes

Conversation

@giscebot

@giscebot giscebot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • extend the intent classifier schema with addressed-to-agent, write permission, and scoped state-change fields
  • pass configured agent identity into the classifier prompt instead of relying on a hard-coded bot name
  • keep PR review follow-ups in review_only unless the classified/requested intent explicitly allows repository state changes
  • stop upgrading assigned or bot-authored PR discussions to work_allowed automatically
  • expose the effective action mode to agent prompts and environment variables
  • show action mode and intent-classifier decisions in the dashboard job detail for debugging

Tests

  • .venv/bin/python -m pytest tests/test_parser.py tests/test_intent_classifier.py tests/test_queue.py tests/test_executor.py tests/test_prompt_rules.py -q
  • .venv/bin/python -m pytest -q --ignore=tests/test_backend.py
  • cd dashboard && npm run lint
  • cd dashboard && npm test -- src/main.test.tsx
  • git diff --check

Note

  • Full .venv/bin/python -m pytest -q segfaulted in the local Python 3.14 environment inside _asyncio/Starlette TestClient while running backend tests; no assertion failure was reported before the interpreter crash. CI runs pytest on Python 3.11/3.12.

@ecarreras ecarreras requested a review from pilipilisbot July 3, 2026 09:06

@pilipilisbot pilipilisbot left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Approved. I reviewed the parser/classifier/queue/executor changes and the prompt/documentation updates for the action-mode boundary.

What I checked:

  • Assignments and bot-authored PR discussions no longer upgrade review_only jobs to work_allowed; executor now only records that the action mode was retained.
  • The intent classifier receives configured bot/agent identity, normalizes unaddressed events to archive_notification, and requires write_permission=state_change_allowed before accepting work_allowed.
  • The dispatcher exposes the effective action mode in the prompt and environment while preserving existing review-only prompt rules.
  • GitHub CI is green for dashboard and pytest on Python 3.11/3.12.
  • Local git diff --check and python3 -m py_compile over the changed Python modules/tests pass.

I could not rerun the pytest suite locally because this container has no repo virtualenv, no uv, and global python3 lacks pytest, but the CI result covers the suite. No blocking findings from the review.

@pilipilisbot pilipilisbot left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Reviewed the new dashboard commit (fa002b1) on top of the earlier approved action-mode changes. The added job-detail panel exposes the effective action mode and intent-classifier metadata without changing dispatch behavior, and the backend keeps the dashboard data shape scoped to job metadata.

Checks:

  • GitHub CI is green: dashboard, pytest (3.11), and pytest (3.12).
  • Local python3 -m py_compile passed for the changed Python modules/tests.
  • Local git diff --check c52e43e..fa002b1 passed.

I could not rerun local pytest/vitest/tsc in the clean worktree because this container has no pytest, vitest, or tsc installed there, but CI covers those suites. No blocking findings from the latest delta.

@giscebot

giscebot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Screenshot

Dashboard job detail with the new action-mode / intent-classifier section:

Dashboard job detail showing action mode and intent classifier decision fields

@ecarreras ecarreras merged commit 15c1cd4 into pilipilisbot:main Jul 3, 2026
3 checks passed
@pilipilisbot

Copy link
Copy Markdown
Owner

Post-merge follow-up: PR #148 is merged as 15c1cd440d34e58309e14d5bafa3d932cc80f99a. The final PR head fa002b1 had all required checks green (dashboard, pytest (3.11), pytest (3.12)) and the latest dashboard/action-mode delta was already reviewed and approved.

No additional repository changes are needed from this merge event.

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.

3 participants