feat: phase 5 — determinism classification, per-check config, activation authority - #7
Merged
Merged
Conversation
…ion authority
- Derive deterministic/stochastic badge from check type (no DB column):
template/generated → deterministic, judge → stochastic
- CheckResult gains `type` field, stored in CaseResult.checks JSON for display
- registry.py stamps type on every result including error fallbacks
- New update_check_params() in service.py; deep-copies config to ensure
SQLAlchemy JSON dirty detection; draft-only, recomputes content_hash
- _build_check_list adds determinism + check_index fields
- New GET /pipelines/versions/{vid}/checks and PATCH /pipelines/versions/{vid}/check-params endpoints
- POST /pipelines/generate surfaces PermissionError (activated:false + permission_error)
instead of silently swallowing it in enforced mode
- determinism_badge macro added to _macros.html
- pipeline_review.html: badge per check row + All/Deterministic/Stochastic filter pills
- pipeline_new.html Step 3: fetches persisted checks, shows badges, inline param editing,
draft warning banner for enforced-mode non-reviewer flows
- _transcript.html: badge + score/threshold display per check (graceful for old records)
- 10 new tests in test_phase5.py; all 143 tests passing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tion - Stochastic badge → badge-pro (purple); deterministic badge → badge-accent (blue) Applies everywhere: _macros.html, pipeline_new.html Alpine bindings, review page coverage bar (judge segment now var(--text-pro)) - Wizard step 3: auto-redirects to /pipelines after 2.5 s with a "Draft saved" banner and "Go now" link — eliminates the ephemeral-state refresh problem - Remove per-check param editing expanders from wizard step 3; checks are now a read-only preview before redirect Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Storage Adds init() + _persist() to the Alpine component: - On page load (new pipeline only), restores requirements/project/name/adapter/ model/endpoint/key_env from localStorage key 'assay_wizard_new' - $watch on each field saves to localStorage on every change - localStorage cleared on successful generate so the next new-pipeline visit starts blank - Edit flows (resumeVersionId set) skip localStorage entirely — server supplies the pre-populated values Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
saveDraft() now: clears localStorage, sets draftSaved flag (shows fixed-position success toast), then navigates to /pipelines after 1.5 s. Previously it silently fired the POST with no user feedback. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
After deleting a draft from the new/edit wizard (steps 1 or 2), the user
lands on /pipelines. The review-page delete is unchanged — it still goes
to /projects/{name} since that page is the natural parent from there.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All three delete buttons (review page + wizard steps 1 & 2) now navigate to document.referrer if it's same-origin, otherwise fall back to /pipelines. This means: arrived from /projects/foo → goes back there; arrived from /pipelines → goes back there; no referrer → /pipelines. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two root causes fixed:
1. Server was returning HX-Redirect to /projects/{name} which htmx processed
immediately, racing against (and winning over) the client-side handler.
delete_pipeline now returns plain {"ok": true} — client controls routing.
2. document.referrer is unreliable here: if the user arrived from the project
detail page, referrer was /projects/{name} which is now an empty ghost.
All three delete buttons (wizard step 1, step 2, review page) now
unconditionally navigate to /pipelines on success.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
deterministic/stochasticfrom checktypeeverywhere checks appear — review page, wizard Step 3, and run transcripts. No DB column;template/generated→ deterministic,judge→ stochastic.withparams inline (PATCH/pipelines/versions/{vid}/check-params). Draft-only; active/archived versions → 409.POST /pipelines/generateno longer silently swallowsPermissionErrorin enforced mode. Non-reviewer users seeactivated: false+ a "saved as draft — reviewer activation required" banner with a link to the review page.pipeline_review.html(Alpine, read-only page stays read-only).Test plan
pytest -q— should show 143 passed/pipelines/new, generate a pipeline, confirm Step 3 shows determinism badges and "Edit params" expanders per checkmax_ms) and verify the value persists after page refresh via the review page/pipelines/{id}/versions/{vid}/review) and click the Deterministic / Stochastic filter pills🤖 Generated with Claude Code