chore(v20b): remove the implicit capture layer — implicit signals go, explicit engagement stays - #488
Merged
Merged
Conversation
runyourempire
enabled auto-merge (squash)
August 18, 2026 02:01
auto-merge was automatically disabled
August 18, 2026 02:35
Pull request was closed
runyourempire
enabled auto-merge (squash)
August 18, 2026 02:35
… explicit engagement stays AD-031 (operator decision 2026-08-17): delete the implicit behavioral-capture layer end-to-end; explicit engagement capture stays; scoring is byte-identical (NO PIPELINE_VERSION bump — stays at 21). Removed (proof class: implicit capture — AD-029 demoted it from scoring in v19, v20a deleted its last honest UI surfaces, leaving a write-only pipeline): - FE emitters: use-view-tracking.ts (sole scroll/ignore emitter) + its wiring in ResultItem/ResultsView (itemIndex kept — it drives auto-summary) - BehaviorAction::Scroll/Ignore variants, their strength arms and IPC match arms; engagement_telemetry::on_implicit_skip (+3 tests) - Derived-profile writers in ace/behavior/tracking.rs: update_topic_affinities, update_anti_topics, update_source_preference, update_activity_patterns, RECOMPUTE_AFFINITY_SQL (a frozen copy is inlined into db/migrations.rs so historical Phase 89/90 behave identically for pre-89 databases), and taste_test/continuous.rs (persona-posterior write side; the EXPLICIT taste seeding via add_interest + generate_synthetic_feedback survives untouched) - Readers of the dropped tables: ace/behavior/queries.rs (whole file), ace_get_topic_affinities / ace_get_anti_topics commands (registry 383->381, ghost backlog entries cleared in the same commit), the three affinity anomaly detectors (context drift / contradiction / confidence mismatch — detect_abnormal_volume and stale-data KEPT; AnomalyType variants KEPT so historical stored anomaly rows still deserialize), the tech-radar affinity overlay + its always-0 engagement score term, the learned_behavior export section (+ i18n key removed from en + 12 locales), apply_behavior_decay (detected-tech decay + frozen tuner survive), the AD-029 quarantine loader and the anti_topics / anti_topic_confidence / topic_affinities fields on ACEContext, and the simulation enrichment arms + persona anti-topic fixtures - Zero-reader proof class (justified separately, not implicit): autophagy decision_outcomes.rs — its "results feed back into scoring" doc claim was false; no reader of the decision_outcome digest_type ever existed Re-sourced to explicit engagement (the #476 six-type predicate over `interactions`, mirroring detect_skill_gaps): standing-query suggestions and Developer DNA get_top_engaged_topics — return shapes preserved, counts honest. Kept per rulings: - A1: Dismiss / MarkIrrelevant / BriefingDismiss still write interactions rows and feed the stability_detector and record_item_feedback - A2(a): SkillsDimension.top_affinities + AffinityEntry + the INV-023 guard test behavioral_affinities_do_not_exclude_gaps KEPT; only the source query deleted (field permanently empty — serialized-shape stability, the pinned ScoreBreakdown doctrine). The v20 explicit skill-gap query directly below it is untouched; all four skill-gap tests pass. - A5: the bootstrap-mode term in scoring/context.rs is UNTOUCHED and there is NO DELETE on interactions. Live probe (2026-08-17, post-#482): 713 interactions total, 296 with |signal_strength| >= 0.3, ALL 296 implicit => effective_feedback_count = 98 => bootstrap OFF, held off entirely by implicit rows. Rows kept => count unchanged => scoring byte-identical. Open v20c question recorded in AD-031: should bootstrap-exit require EXPLICIT signal (a scoring change needing a PIPELINE_VERSION bump)? - A7: the snooze bug is untouched (out of scope). Migration Phase 105 (TARGET_VERSION 104->105): DROP TABLE IF EXISTS topic_affinities, anti_topics, activity_patterns, source_preferences, persona_posterior, posterior_snapshots (orphaned by #474); DELETE FROM digested_intelligence WHERE digest_type='decision_outcome'. NO deletions on interactions. ACTIVATION: rebuild BOTH fourda and fourda-engine before anything runs (the old-binary/newer-db incident class). FE honesty (required): feedback toasts rewritten as plain confirmations ("Saved." / "Marked irrelevant." / "Dismissed.") — the affinity-boost / anti-topics / auto-filter promises had been false since v19 and named dropped tables. Docs: INV-071 marked RETIRED with its body preserved as history (its display-gate bullet was already stale — the cited counter died in v20a); AD-029 amended to record the partial adoption of its rejected "full removal" option; AD-031 added; historical banners added to specs/ACE-STONE-TABLET.md and specs/CONTEXT-ENGINE.md; API_REFERENCE + ghost-command backlog updated. Calibration-window drift (report item): autophagy calibration analyzers read interactions over rolling windows; v20b stops NEW implicit rows, so those windows drift gradually as legacy rows age out — forward-looking data-mix drift, not a change to any current computation (day-0 output identical). Also while here: removed three dead-mechanism simulation tests that had passed vacuously since v19 (ace_anti_topic_excludes_matching_content, breakdown_anti_penalty_range, penalties_asymmetrically_stronger_than_boosts — the ACE anti-topic scoring mechanism they asserted left in AD-029); removed a duplicated `use super::*;` in llm_stream_tests.rs (the battery's only warning, pre-existing); added two `retired-ok` history markers in mcp-4da-server/CHANGELOG.md so check-retired-claims passes via its own documented escape hatch (lint markers only — the mcp-4da-server code/db cleanup stays deferred to v20c per A4). Verification: cargo test --lib 4380 passed / 0 failed / 8 ignored; clippy --lib -D warnings clean; cargo fmt applied to touched files; no new allow(dead_code); golden/simulation assertions untouched (zero baseline edits); FE 1242/1242 green; tsc clean; i18n:types regenerated; validate-commands consistent at 381; ghost-commands 0 new / 0 stale; check-file-sizes 0 errors; check-retired-claims OK; migration test test_phase_105_drops_implicit_capture_tables added per the existing idiom. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LBY5q2MskiKMkTm6NmB49L
runyourempire
force-pushed
the
chore/v20b-implicit-capture
branch
from
August 18, 2026 02:44
36adff2 to
fa08e79
Compare
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.
v20b: removal of the IMPLICIT behavioral-capture layer, per the completed read-only inventory and the seven operator rulings (2026-08-17). Companion to #474 (v20a). Implicit capture goes, explicit engagement stays, scoring is byte-identical — NO PIPELINE_VERSION bump (stays at 21). New decision record: AD-031; AD-029 amended; INV-071 retired.
Rulings A1–A7 as implemented
interactionsrows and feed the keptstability_detector::record_evidenceloops andrecord_item_feedback. Only their dead affinity/anti-topic consumers were removed.SkillsDimension.top_affinities+AffinityEntry+ INV-023 guard test KEPT. Only the source query insovereign_developer_profile.rs::assemble_skillswas deleted; the field is permanently empty (serialized-shape stability, same doctrine as the pinned ScoreBreakdown fields). The v20 explicit skill-gap query directly below it is untouched; all four skill-gap tests pass, includingbehavioral_affinities_do_not_exclude_gapsandno_explicit_engagement_means_no_gaps.detect_context_drift,detect_contradictions,detect_confidence_mismatch+ their tests/fixtures).detect_abnormal_volumeanddetect_stale_dataKEPT. TheAnomalyTypeenum variants were deliberately KEPT so historical stored anomaly rows still deserialize and render — this kept the Anomalies UI coupling trivial (no STOP needed).mcp-4da-serverDEFERRED to v20c. No code/db changes in it. Its reads degrade gracefully on the dropped tables; note that itsdb.tsCREATE TABLE IF NOT EXISTSmay resurrect emptytopic_affinities/anti_topicstables in 4da.db — cosmetic, cleaned in v20c. (One exception, disclosed: tworetired-okHISTORY MARKERS added tomcp-4da-server/CHANGELOG.md— the check-retired-claims gate fails on the base because the 5.0.2 changelog entry quotes the retired claims as history without the gate's documented marker. Lint markers only, zero behavior.)interactions, so the count — and therefore scoring — is unchanged. Open v20c question (recorded in AD-031): should bootstrap-exit require EXPLICIT signal? That is a scoring change and needs a PIPELINE_VERSION bump.ace_commands/interactions.rs:429died in v20a; the file now ends at ~400 lines). AD-029 amended to record the 2026-08-17 partial adoption of its previously-rejected "full removal" option (implicit removed, explicit kept — the "destroys honest surfaces" objection dissolved when v20a removed those surfaces). AD-031 added following the file's format.specs/: historical-status banners added to ACE-STONE-TABLET.md and CONTEXT-ENGINE.md (matching the existing 2026-08-16 banner idiom); history sections not rewritten.STOP facts honored
record_interaction/store_interaction/ace_record_interactionall survive — only the Scroll/Ignore arms and the implicit-skip block were excised inside them.ace_record_interactionstays registered everywhere (lib.rs, CommandMap, Victauri allowlist). The implicit-skip excision was scoped to the if-block inside the sameif let Ok(conn)as the KEPT stability loops.Scoring-inertness proof
interactionsrows kept, soeffective_feedback_countis bit-identical.ACEContext.anti_topics/topic_affinitiesfields had NO reader in the scoring pipeline (v19 removed them; the quarantine loader returned an empty map by construction) — their only remaining readers were two LLM-prompt injections:analysis_rerank.rs(block never fired — live table 0 rows) and the digest prompt, which is now unconditionally the same "None specified" string it always produced, keeping the prompt byte-identical.cargo test --lib) all pass unmodified.ace_anti_topic_excludes_matching_content(a pure-Rust persona scores python items <0.05 regardless),breakdown_anti_penalty_range(plain range check),penalties_asymmetrically_stronger_than_boosts(its two contexts became literally identical). Removing a vacuous test changes no asserted number.interactionsover rolling windows. v20b stops NEW implicit rows, so those windows gradually shift toward explicit-only as legacy rows age out. Day-0 output is identical; the drift is organic data-mix change, not a computation change.Migration Phase 105 (TARGET_VERSION 104 → 105)
NO DELETE/UPDATE on
interactions(A5). Historical Phase 89/90 keep byte-identical behavior via a frozen inline copy of the recompute SQL (the live const was deleted with tracking.rs's learning layer). New migration testtest_phase_105_drops_implicit_capture_tablesfollows the existing wind-back idiom (seeds legacy tables + a decision_outcome digest + an implicit interaction row at v104, re-migrates, asserts dropped/purged/KEPT).ACTIVATION REQUIREMENT: rebuild BOTH
fourdaandfourda-enginebefore anything runs after merge. An old binary opening the schema-105 database is the exact incident class that quarantined the live corpus on 2026-08-16 (old-binary/newer-db → corrupt-db fallback). Migrate and rebuild together.Zero-reader proof class (separate justification)
autophagy/decision_outcomes.rswas deleted not as implicit capture but as a zero-reader: it wrotedecision_outcomedigests that no code ever read back (its module doc claimed "results feed back into scoring" — false). Unwound throughAutophagyCycleResult(ts-rs binding regenerated by the suite, not hand-edited), digest.rs, autophagy_commands.rs.Re-sourced consumers (kept features made honest)
standing_queries_suggestions.rs: suggestions now come from 3+ explicit positive-engagement interactions (the fix(scoring): close the two behavioral inputs that survived the v19 quarantine — PIPELINE_VERSION 20 #476 six-type predicate overinteractions, mirroringdetect_skill_gaps); 4 tests re-fixtured, incl. an explicit guard that legacyscrollrows never count.developer_dna.rs::get_top_engaged_topics: same predicate; return shape preserved;interactionsis now an honest count (previouslyaffinity_score as u32, i.e. almost always 0).Inventory deviations found and handled
commands.rs(notace/behavior/commands.rs) held the decay call — as inventoried by content, path corrected.personas.rspersonaanti_topicsfeed the KEPTexclusionsscoring input — left fully untouched (deleting them would have changed validation numbers).differential.rs/ace_validation.rscontained three anti-topic fixture sites the inventory's "~8 simulation files" bucket did not enumerate — handled as above.source_items.view_countis now write-only (its only reader was the deleted return-visit strength boost). The write was KEPT (not in the inventory's removal scope); flagged as a v20c candidate.source_preferencesname-trap honored: zero changes understacks/.Verification (all required gates)
cargo test --lib(full, incl. scoring simulation + validation + migration tests)cargo clippy --lib -- -D warningscargo fmt(targeted, all touched files)#[allow(dead_code)]pnpm run test(FE)pnpm run typecheckpnpm run i18n:typesnpx eslint(touched TS)check-file-sizes.cjscheck-retired-claims.cjsghost-commands.cjsvalidate-commands.cjsanti_topics_no_longer_feed_the_negative_stack,detected_tech_decay_runs_and_does_not_compound,test_engagement_summary_shape— all passKnown-external on this base (per orchestrator): the NOTICE attribution delta from #450 (fix merging as #486) — not regenerated here to avoid conflicting; resolved by rebase at landing.
DO NOT run the migration or touch data/4da.db until both binaries are rebuilt.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LBY5q2MskiKMkTm6NmB49L