feat(bus): close-experiment — terminal state for a proposal/run that will never produce a result - #181
Open
asachs01 wants to merge 1 commit into
Open
feat(bus): close-experiment — terminal state for a proposal/run that will never produce a result#181asachs01 wants to merge 1 commit into
asachs01 wants to merge 1 commit into
Conversation
…will never produce a result A proposed experiment whose linked approval was declined, or a running experiment created before --baseline was required (baseline_value: null), had no way to reach a terminal state without either running something already rejected or being permanently refused by evaluate-experiment's baseline guard. Every future fleet scan of proposed-but-never-run experiments re-flagged the same records indefinitely (task_1788276326374_26114110, recurrence bumped it to high priority; task_1788228728494_04553223 for the orphaned-running case). Adds status: 'closed', reachable from 'proposed' or 'running', refusing on an already-completed or already-closed record. Reason is required and stored in the new closed_reason field; closed_at is kept separate from completed_at since a closed experiment never produced a real result. Deliberately doesn't touch `decision` — closing is never a keep/discard verdict. Considered and rejected the fuller MPAC-style terminal-state taxonomy (REJECTED/ABANDONED/SUPERSEDED) proposed in the task's theta-wave notes — a single status + free-text reason covers every concrete case seen without a fixed enum needing its own maintenance. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Summary
cortextos bus close-experiment <id> "<reason>", a new terminalstatus: 'closed'reachable fromproposedorrunning, distinct fromevaluate-experiment's keep/discard (which always requires a real measurement).baseline_value, structurally unevaluatable, no repair path) per the 09-05 theta-wave note recommending both land as one CLI change.closed_reason(required, free-text, stored verbatim) andclosed_at(kept separate fromcompleted_at, which stays null on a closed record since it never produced a real result).decisionis deliberately untouched — closing is never a keep/discard verdict.agent,analyst,orchestrator). The codex/opencode/community fork copies ofbus-reference/SKILL.mdalready carry independent drift from these three (verified via diff) and are left for a separate sync pass rather than hand-reconciling ~7 divergent files in this PR.statusBadge()in the experiments page now has an explicitclosedentry (previously would've fallen back to the generic unmapped-status badge, which is harmless but the mapped one is clearer).Test plan
npm run typecheck— cleannpm run build(tsup) — cleannpx vitest run tests/sprint3-experiments.test.ts— 64/64 passing (8 new tests covering: close from proposed, close a running experiment with no baseline that evaluate-experiment refuses, active.json cleanup on close, active.json NOT disturbed when closing a different experiment, refuse double-close, refuse closing a completed experiment, not-found error, status filter)npx vitest run tests/unit/cli/bus-list-experiments-format.test.ts— 5/5 passingnpx vitest run— 2589 passing / 2 failing / 51 skipped across 165 files. The 2 failures (watcher-ingests-real-events.test.ts) and 6 error-only files (better-sqlite3/next/servermodule-not-found) are pre-existing to this fresh worktree —dashboard/is a separately-installed package (no root npm workspace) and itsnode_moduleswas never populated here; confirmed vials node_modules/better-sqlite3/ls node_modules/next(both absent) before touching any test file. None of the 8 failing files are in this PR's diff.🤖 Generated with Claude Code
Task-ID: task_1788276326374_26114110
Agent: dev
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.