Repository navigation
feat(decision): harden decision layer (rounds 5-7) - #9
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- R-13: wire all six dead integration points (compounder, KG typing, outcome, failure, handoff, contradiction) so every point is reachable - R-4: batch decisions (choose_batch/judge_batch) - one request for N questions - R-10: circuit breaker + spend cap - R-12: hash-only replay fingerprint (migration) - R-14: fail loudly when decision tables are missing - R-17: health_probe backend/auth -> degraded; track last success - R-5/R-16: review-band enqueue for contradiction + verification - R-15: decision_reviews dedup (migration) - R-1/R-2: independent DB connection for network commands; reuse ureq agent - R-3: daemon threshold band + decision_usage audit - R-7: worktree diff feeds semantic secrets check - docs: architecture, spec, review rounds 1-7
Add inferOutcome/diagnoseFailure to src/lib/ipc/commands.ts, use the IPC constants in intelligenceStore, and regenerate the registered-but-unused snapshot (run_kg_extraction_cmd) per the contract test's documented workflow.
- H1: annotate blocking-network commands #[tauri::command(async)] (Tauri v2 runs sync commands on the main thread, so the previous sync conversion froze the UI) - M1: independent connection for compound_knowledge / create_budget / run_compounder step 3 (shared lock was still held across HTTP) - M2: migration 019 collapses pre-existing duplicates before the unique index - M3: assert_decision_tables also verifies the input_hash column - L1..L9: drop foot-gun AppState::default, correct stale docs + migration numbers, daemon band tests, cfg(test) breaker isolation, tighter hosted-URL guard, route intel invokes through IPC constants - docs: review-round8.md; AGENTS.md repo rules (worktree+branch+review+merge, never push to main)
This branch was successfully deployed
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.
What
Hardens the decision layer (spec
001-decision-layer) — rounds 5–7 of the adversarial review — rebased onto currentorigin/main.Fixes
choose_batch/judge_batch): one request for N questions (KG types+gate = 2, relations = 1, contradictions = 1/item; was 2·N / N / N²).db::open_aux+busy_timeout), so the sharedMutex<Connection>is never held across HTTP.ureq::Agentper timeout; blocking-network commands are non-async.decision_usageaudit line.$5spend cap.input_hash, FNV-1a).decision_reviewsdedup.health_probe: backend/auth →degraded; trackslast_success_ms().Reconciliation with
origin/maincommands::run_compounder_cmd— origin already shipsknowledge_commands::run_compounder_cmd+ the splitcompounder_prepare_prompt/compounder_mergehelpers (kept theirs).017_decision_reviews_unique→ 019,018_decision_usage_hash→ 020 (origin took 017 for017_build_runs.sql).inferOutcome,diagnoseFailure) instead of inline literals; regenerated the IPC unused-command snapshot per the contract test's documented workflow.Verification
cargo test(MSVC)npm testnpx tsc --noEmitnpm run lintpytest local-daemon/tests/test_router.pyMigrations added:
019_decision_reviews_unique.sql,020_decision_usage_hash.sql.Docs:
architecture.md(§5 reachability + §8 risk register),spec.md,review-round5..7.md.