Repository navigation
fix: avoid creating anynous - #6
Merged
Merged
Conversation
0xHericles
approved these changes
Apr 4, 2025
viktormarinho
added a commit
that referenced
this pull request
Jul 31, 2026
… template (#5501) Imported from studying oven-sh/bun's agent-development setup: - .claude/hooks/pre-guard.js (PreToolUse): denies `git push` to main and bare `bun test` from the repo root with corrective messages; escalates knip config edits to the human via "ask" (Gotcha #6, with an escape hatch for legitimate edits like new workspace entries). - .claude/hooks/post-edit-format.js (PostToolUse): runs Biome format on each edited file, fail-open — removes the "pure-format follow-up PR" class entirely. - PR template: adds "How did you verify your code works?" section. - auto-label-claude-prs.yml: labels agent-authored PRs (detected by the "🤖 Generated with" signature) with `claude`. - comment-cop.yml: on claude-labeled PRs, flags added multi-line comment blocks in apps/, packages/, plugins/ per the CLAUDE.md rule that a paragraph justifying a workaround means the code is wrong. Marker-based dedupe, auto-resolves threads when the block disappears, JSDoc blocks skipped, never checks out PR code (pull_request_target-safe). 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
guitavano
added a commit
that referenced
this pull request
Jul 31, 2026
…tokens, dedup enqueue P1: - #4 double-enqueue race: per-(task,reviewer,cycle) claim table (INSERT ... ON CONFLICT DO NOTHING) gates each reviewer so a concurrent/duplicate trigger enqueues a reviewer at most once per cycle. - #5 reviewer identity forgery: each claim mints a reviewToken bound to the reviewer; TASK_BOARD_REVIEW_DECISION marks a decision `verified` only when the token resolves to a claim whose reviewer matches. Auto-merge gate requires every enabled reviewer's latest verdict to be a VERIFIED approve, so one agent can't forge the two-reviewer sign-off. P2: - #6 tests: shared review-cycle reducer + verifiedOnly anti-forgery gate, checks-status parsing/preview-host, reviewer re-review cycle. - #7 duplication: extract enqueueAgentRunForTask (thread create + link + persist-before-dispatch + enqueue) shared by the Super Agent and reviewer enqueues; reuse StudioContextFactory instead of a local copy. Co-Authored-By: Claude Opus 4.8 <[email protected]>
guitavano
added a commit
that referenced
this pull request
Jul 31, 2026
…roduction (#5520) * feat(task-board): QA Agent + Code Reviewer review flow with ship-to-production Add two per-org automated reviewers that run on a task's PR once the Super Agent finishes, gated by org flags, plus a manual "ship to production" merge. - Reviewers: QA Agent (verifies the task solved the problem) and Code Reviewer (reviews the code with the repo's stack review skills). Enabled per-org via `qa_agent_enabled` / `code_reviewer_enabled` flags; both run as linked threads shown live on the card, delegated by the Super Agent. - Trigger is headless: fires from the projector's run-terminal hook when a Super Agent run finishes (no UI required); the modal's poll is a safety net. - Decision via `TASK_BOARD_REVIEW_DECISION` (request_changes hands back to the Super Agent with feedback + `gh pr checkout` to update the same PR; approve records the sign-off). Auto-merge (`auto_merge` flag) merges once every enabled reviewer approves; a manual "Ship to production" button + merge tool otherwise. - Merge is gated on CI: never ships on failing/pending checks (client + server). - PR card: live state, an expandable checks footer (Status API + Checks API, with each failing check's output markdown), and the deco deploy preview link (lifted from the deploy bot's PR comment). Concurrent GitHub reads + a loading skeleton. - Dev: dispatch defaults the sandbox target to the env-configured provider so background runs work under `--local-sandbox-provider`. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(task-board): review-cycle re-review + preview-host injection + org-scoped merge conn Address blockers/important findings from the branch review: - Re-review never re-ran the reviewers: the thread-finish backstop advanced a task to In Review without recording a `status_changed` activity, so the reviewer cycle boundary (`lastInReviewAt`) went stale after a request_changes fix pushed to the same PR. Record the transition so reviewers re-run. - Preview-host match was an unanchored substring on attacker-writable PR-comment URLs (phishing button + a URL the autonomous QA agent opens). Replace with a strict hostname check (`isDecoPreviewHost`). - `resolveGithubConnection` resolved a linked connectionId without an org filter on a PR-merge (write) path — org-scope the lookup. - Add unit tests: `isDecoPreviewHost` (incl. the decoy), `reviewerHandledThisCycle` (incl. the re-review prior-cycle case). Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(task-board): harden review flow — anti-race claims, anti-forgery tokens, dedup enqueue P1: - #4 double-enqueue race: per-(task,reviewer,cycle) claim table (INSERT ... ON CONFLICT DO NOTHING) gates each reviewer so a concurrent/duplicate trigger enqueues a reviewer at most once per cycle. - #5 reviewer identity forgery: each claim mints a reviewToken bound to the reviewer; TASK_BOARD_REVIEW_DECISION marks a decision `verified` only when the token resolves to a claim whose reviewer matches. Auto-merge gate requires every enabled reviewer's latest verdict to be a VERIFIED approve, so one agent can't forge the two-reviewer sign-off. P2: - #6 tests: shared review-cycle reducer + verifiedOnly anti-forgery gate, checks-status parsing/preview-host, reviewer re-review cycle. - #7 duplication: extract enqueueAgentRunForTask (thread create + link + persist-before-dispatch + enqueue) shared by the Super Agent and reviewer enqueues; reuse StudioContextFactory instead of a local copy. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(task-board): add TASK_BOARD_REVIEW_DECISION to Task Manager tools integration assertion The studio-pack integration test pinned the Task Manager's selected_tools without TASK_BOARD_REVIEW_DECISION, which the review flow added to the manager. Align the expected list with the source (task-manager.ts) and the unit test. Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.