Skip to content

chore(v20b): remove the implicit capture layer — implicit signals go, explicit engagement stays - #488

Merged
runyourempire merged 1 commit into
mainfrom
chore/v20b-implicit-capture
Aug 18, 2026
Merged

chore(v20b): remove the implicit capture layer — implicit signals go, explicit engagement stays#488
runyourempire merged 1 commit into
mainfrom
chore/v20b-implicit-capture

Conversation

@runyourempire

Copy link
Copy Markdown
Collaborator

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

  • A1 — Dismiss / MarkIrrelevant / BriefingDismiss STAY. They still write interactions rows and feed the kept stability_detector::record_evidence loops and record_item_feedback. Only their dead affinity/anti-topic consumers were removed.
  • A2(a) — SkillsDimension.top_affinities + AffinityEntry + INV-023 guard test KEPT. Only the source query in sovereign_developer_profile.rs::assemble_skills was 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, including behavioral_affinities_do_not_exclude_gaps and no_explicit_engagement_means_no_gaps.
  • A3 — the three affinity/anti-topic anomaly detectors removed (detect_context_drift, detect_contradictions, detect_confidence_mismatch + their tests/fixtures). detect_abnormal_volume and detect_stale_data KEPT. The AnomalyType enum variants were deliberately KEPT so historical stored anomaly rows still deserialize and render — this kept the Anomalies UI coupling trivial (no STOP needed).
  • A4 — mcp-4da-server DEFERRED to v20c. No code/db changes in it. Its reads degrade gracefully on the dropped tables; note that its db.ts CREATE TABLE IF NOT EXISTS may resurrect empty topic_affinities/anti_topics tables in 4da.db — cosmetic, cleaned in v20c. (One exception, disclosed: two retired-ok HISTORY MARKERS added to mcp-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.)
  • A5 — bootstrap term UNTOUCHED, rows KEPT. Live probe (2026-08-17, post-chore(scoring): PIPELINE_VERSION 21 — bump-only activation of #471's word-boundary fixes #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. v20b performs NO DELETE/UPDATE on 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.
  • A6 — docs: INV-071 marked RETIRED with a reason, body preserved as history (its display-gate bullet was already stale — the cited counter at ace_commands/interactions.rs:429 died 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.
  • A7 — snooze untouched. No snooze arm added, FE call not removed.

STOP facts honored

  1. record_interaction / store_interaction / ace_record_interaction all survive — only the Scroll/Ignore arms and the implicit-skip block were excised inside them. ace_record_interaction stays registered everywhere (lib.rs, CommandMap, Victauri allowlist). The implicit-skip excision was scoped to the if-block inside the same if let Ok(conn) as the KEPT stability loops.
  2. ACE DB = main DB honored throughout (Phase 105 runs on the shared 4da.db).
  3. Scoring touched at exactly the two reported points and nowhere else: the A5 bootstrap term (untouched) and the calibration-window note below. Zero golden/simulation baseline edits; no asserted number changed.

Scoring-inertness proof

  • PIPELINE_VERSION untouched at 21.
  • A5 numbers above; interactions rows kept, so effective_feedback_count is bit-identical.
  • The deleted ACEContext.anti_topics / topic_affinities fields 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.
  • Full suite green with zero baseline adjustments: the scoring simulation + validation suites (inside cargo test --lib) all pass unmodified.
  • Three simulation tests were REMOVED, not adjusted — they asserted the ACE anti-topic scoring mechanism deleted in v19 (AD-029) and had passed vacuously ever since: 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.
  • Calibration-window drift (forward-looking note, not a change): the autophagy calibration analyzers read interactions over 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)

DROP TABLE IF EXISTS topic_affinities;
DROP TABLE IF EXISTS anti_topics;
DROP TABLE IF EXISTS activity_patterns;
DROP TABLE IF EXISTS source_preferences;
DROP TABLE IF EXISTS persona_posterior;
DROP TABLE IF EXISTS posterior_snapshots;   -- orphaned by #474
DELETE FROM digested_intelligence WHERE digest_type = 'decision_outcome';

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 test test_phase_105_drops_implicit_capture_tables follows 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 fourda and fourda-engine before 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.rs was deleted not as implicit capture but as a zero-reader: it wrote decision_outcome digests that no code ever read back (its module doc claimed "results feed back into scoring" — false). Unwound through AutophagyCycleResult (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 over interactions, mirroring detect_skill_gaps); 4 tests re-fixtured, incl. an explicit guard that legacy scroll rows never count.
  • developer_dna.rs::get_top_engaged_topics: same predicate; return shape preserved; interactions is now an honest count (previously affinity_score as u32, i.e. almost always 0).

Inventory deviations found and handled

  • commands.rs (not ace/behavior/commands.rs) held the decay call — as inventoried by content, path corrected.
  • personas.rs persona anti_topics feed the KEPT exclusions scoring input — left fully untouched (deleting them would have changed validation numbers).
  • The i18n key existed in 13 locale files total (en + 12), not en + 13.
  • differential.rs / ace_validation.rs contained three anti-topic fixture sites the inventory's "~8 simulation files" bucket did not enumerate — handled as above.
  • source_items.view_count is 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.
  • Stacks source_preferences name-trap honored: zero changes under stacks/.

Verification (all required gates)

Check Result
cargo test --lib (full, incl. scoring simulation + validation + migration tests) 4380 passed / 0 failed / 8 ignored
cargo clippy --lib -- -D warnings clean
cargo fmt (targeted, all touched files) applied
New #[allow(dead_code)] none
Golden / simulation baselines zero edits
pnpm run test (FE) 1242/1242 passed (111 files)
pnpm run typecheck clean
pnpm run i18n:types regenerated (diff committed)
npx eslint (touched TS) 0 errors (3 pre-existing warnings in untouched DataExportPanel lines)
check-file-sizes.cjs exit 0, no new errors
check-retired-claims.cjs OK (after the two disclosed history markers)
ghost-commands.cjs 0 new / 0 stale (both cleared backlog entries removed with their commands)
validate-commands.cjs consistent at 381 (was 383)
Sacred tests all four skill-gap tests, anti_topics_no_longer_feed_the_negative_stack, detected_tech_decay_runs_and_does_not_compound, test_engagement_summary_shape — all pass

Known-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

@runyourempire
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 runyourempire reopened this Aug 18, 2026
@runyourempire
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
runyourempire force-pushed the chore/v20b-implicit-capture branch from 36adff2 to fa08e79 Compare August 18, 2026 02:44
@runyourempire
runyourempire merged commit a12d819 into main Aug 18, 2026
24 of 26 checks passed
@runyourempire
runyourempire deleted the chore/v20b-implicit-capture branch August 18, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant