forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Task Description
Several adversarial review failures observed in live pipeline runs reveal gaps in the adversarial-pipeline agent prompt:
Problems Observed
- Wrong test directory — adversarial ran
bun testfrom project root instead ofpackages/opencode, getting "do-not-run-tests-from-root" error - Scope expansion not caught — developer added out-of-scope tests; adversarial approved them
- Cross-platform assumption missed —
expect(tmp.path).not.toContain('/tmp/')fails on Linux; first adversarial caught it, second approved the same code anyway - Inconsistent verdicts — second adversarial APPROVED despite first adversarial finding ISSUES_FOUND on identical code
Required Prompt Additions
Test execution (fix wrong directory):
Run tests from packages/opencode directory ONLY:
cd <worktree>/packages/opencode && bun test
cd <worktree>/packages/opencode && bun run typecheck
Never run from project root or worktree root.
Scope enforcement:
Check: Does the implementation add ANYTHING not in the task description or acceptance criteria?
- New tests not covering the implementation → ISSUES_FOUND (MEDIUM)
- New functions, helpers, or features not requested → ISSUES_FOUND (HIGH)
- Scope expansion is a violation even if the code is correct
Cross-platform check:
Check: Are there platform-specific assumptions?
- Path assertions hardcoding /var/folders (macOS only) or /tmp (Linux)
- OS-specific API usage without fallbacks
- These are CRITICAL if they will fail on common platforms
Explicit APPROVED criteria:
APPROVED only if ALL true:
- All acceptance criteria met
- bun test passes (from packages/opencode)
- bun run typecheck passes (from packages/opencode)
- Zero CRITICAL or HIGH issues
- No scope expansion beyond task description
- No cross-platform assumptions that will break
ISSUES_FOUND if ANY:
- MEDIUM/LOW quality issues OR out-of-scope additions
CRITICAL_ISSUES_FOUND if ANY:
- CRITICAL/HIGH bugs, test failures, typecheck failures, cross-platform breaks
Quality Gates (Non-Negotiable)
- TDD: existing adversarial prompt tests must still pass
- All linting passes
- Local verification complete
Acceptance Criteria
- Adversarial runs tests from correct directory (
packages/opencode) - Adversarial flags out-of-scope additions as ISSUES_FOUND
- Adversarial checks for cross-platform path assumptions
- APPROVED/ISSUES_FOUND/CRITICAL criteria are unambiguous and consistent
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working