Skip to content

feat(proximity): retire constant-score threshold controls - #4909

Merged
ScriptedAlchemy merged 4 commits into
masterfrom
feat/proximity-relationship-hints
Nov 17, 2026
Merged

ScriptedAlchemy merged 4 commits into
masterfrom
feat/proximity-relationship-hints

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Why

Relationship warnings should follow one live policy link rather than a constant numerical risk threshold.

What changed

Retire the numeric feedback.proximity.risk_threshold setting: its key, pin, bounds check, and read mapping are gone. Add feedback.proximity.relationship_hints.v1, a boolean project setting that defaults to true and carries a ProximityPolicyPinV1 snapshot of the configuration revision and behavior digest. The registry definition revision moves to 10.

An old snapshot that still holds the numeric key now returns the typed ResetRequired state, and a setter for the retired key is refused as an unknown setting. The reset test seeds a real revision-9 registry capture, including the exact typed BLOB and the captured and restored sqlite_master triggers.

The direct read runtime keeps its canonical source, enum outcomes, typed denials, and stale and coverage conditions. There is no constant fallback. Live relationship-hint activation is current with no restart. The sync cooldown setting stays pending_restart.

Refs #4416.

Scope

No legacy mapper, no additive default, no cross-lane config edits, and no hand edits to generated files. The L5 configuration phase waits for this merge. No production browser-only gate is missing from this task.

Tradeoffs

Old numeric snapshots reset under the existing typed authority, per the approved no-compatibility and no-migration rule. The policy setting replaces the numeric one. This is not a transparent default preservation. No metrics are claimed.

Blast Radius

Advisory evaluation, the policy-setting registry, and their direct consumers. One new dashboard test only. No SDK package source and no runtime compatibility shim.

Verification

Rerun on base 80ebe1bf65b5708f44a4b4d6df0148cefe024284 after rebase:

  • bazel test //crates/tracedecay-global-db:unit_test --test_filter=configuration::store::tests::retired_proximity_threshold: 2 passed, 0 failed, 548 filtered out.
  • bazel test //crates/tracedecay:unit_test --test_filter=mcp::tools::handlers::configuration_batch_behavior_tests: 2 passed, 0 failed, 819 filtered out. Covers the no-restart live activation journey.
  • bazel test //crates/tracedecay:runtime_acceptance_suite --test_filter=advisory_runtime_acceptance::one_saved_edit_cycle_returns_all_four_advisory_pillars_together: 1 passed, 0 failed, 141 filtered out.
  • bazel build of rustfmt_check_2024 for tracedecay-application, tracedecay-configuration, tracedecay-contracts, tracedecay-domain, tracedecay-global-db, and tracedecay: 6 targets build.
  • pnpm run contracts:check: contracts up to date.
  • pnpm vitest run src/viz/proximity/ProximityPanel.dom.test.tsx: 1 passed.
  • commitlint on all 4 commits: exit 0.

The remote LSP null case stays unresolved and is not waived as an environment bloom failure. Local acceptance passed.


Devin Review

Upgrade impact: a project configuration that holds feedback.proximity.risk_threshold now returns configuration ResetRequired. Reset the project configuration and re-apply custom settings; feedback.proximity.relationship_hints.v1 controls neighborhood hints.
Restore the live-activation assertion the retired threshold used to carry: a
no-restart setting commits and reports drift current in the daemon runtime.
Seed the released key-set fixture through BLOB-typed production rows, restore
the immutability triggers the delete steps around, and bump the registry schema
revision for the replaced definition.
The reset fixture is the released revision-9 key set, so it is named for
that registry revision and carries no capture prose. Seeding reads each
affected table's trigger name and definition from sqlite_master, drops
those exact identifiers with quoted names, and restores the captured SQL,
so the ten immutability triggers have one authority.

The second reset test now seeds the legacy numeric entry beside the
current relationship-hint entry and asserts typed ResetRequired, so the
retired key is refused on its own rather than through a missing key.

Evidence: global-db unit_test 550 passed; configuration unit_test 41
passed; application unit_test 610 passed; tracedecay unit_test 821
passed; runtime_acceptance_suite 142 passed after one LSP capability
flake; exact runs 5/5, 1/1, 5/5, 2/2 with nonzero counts.
@changeset-bot

changeset-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e71d021

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@ScriptedAlchemy
ScriptedAlchemy merged commit 27f43b8 into master Nov 17, 2026
16 checks passed
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