Skip to content

purge: field-level scrub of scoring_context (owner ruling 2026-08-06) - #30

Merged
Gio2050 merged 1 commit into
mainfrom
mission/purge-scoring-context-scrub
Aug 6, 2026
Merged

Gio2050 merged 1 commit into
mainfrom
mission/purge-scoring-context-scrub

Conversation

@Gio2050

@Gio2050 Gio2050 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Owner ruling 2026-08-06. Not a CFG-GOV slot — operational tooling on a non-canonical plane. Nothing here runs; the script remains owner-operated and dry-run by default.

Why

scoring_context was on the keep-list, but it holds both the observations and the worthless pre-CFG-GOV scores (analystScore → uwrScore / uwrAxes / conviction / riskBucket). Keeping the collection whole kept the scores — which is not what the owner asked for, and it is the same collection a ρ was computed from once already.

What changed

scoring_context moves from KEEP_LIST to a new SCRUB_LIST. Every document survives; analystScore is $set to null alongside a self-describing scorePurge marker.

Retained (this is the point — these are observations, not opinions):

Field Why
lenses the persisted enriched view — what makes offline re-scoring possible
rawUss the raw ingest payload as submitted
meta instrument + declared direction
decayParams, compositionRef, uwrResolvedSource provenance

Nulled rather than unset, deliberately: a reader can still distinguish "score deliberately removed" from "row never carried one."

signal_outcomes remains hard-refused and is never written.

Safety

  • The hourly outcomes cron is unaffected. capture-outcomes.mjs reads ctx.meta?.direction (:161) and ctx.meta?.symbol (:176) and never reads analystScore. Verified in source, not assumed.
  • The scrub issues $set only, never a delete, and asserts its document count is byte-identical before and after.
  • Defense-in-depth extended both ways: a scrub-list collection may never appear in the deleteMany set, and a keep-list collection may never appear in the scrub set.
  • Dry-run now reports two numbers — "would delete" and "would null" — so neither hides behind the other.
  • Post-run assertions: keep-list counts unchanged, scrub document counts unchanged, zero scores remaining, zero purge residue. Any violation exits 2.

Verification

node --check clean. Both refusal paths proven without a database — unknown argument and missing AFI_EVIDENCE_MONGODB_URI each exit 1. No database URI exists on this machine, so no dry-run count was possible; the script is ready the moment one is supplied.

Deploy notes updated with the ruling and the cron-safety reasoning.

🤖 Generated with Claude Code

Owner ruling 2026-08-06. scoring_context held both the observations and the
worthless pre-CFG-GOV scores; keeping the collection whole kept the scores.

- scoring_context moves from KEEP_LIST to a new SCRUB_LIST: every document
  survives, analystScore is $set to null, plus a self-describing scorePurge
  marker (nulled, not unset, so "deliberately removed" stays distinguishable
  from "never carried one").
- Retained: lenses (enables offline re-scoring), rawUss, meta, decayParams,
  compositionRef, uwrResolvedSource. signal_outcomes stays hard-refused.
- Safe for the hourly outcomes cron: capture-outcomes.mjs reads meta.direction
  and meta.symbol, never analystScore. Verified in source.
- Defense in depth extended: a scrub-list collection may never appear in the
  deleteMany set, and a keep-list collection may never appear in the scrub set.
- Dry-run now reports both "would delete" and "would null" counts; post-run
  asserts scrub document counts are unchanged and zero scores remain.

Refusal paths proven without a database (unknown arg, missing URI: exit 1).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Aug 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@kilo-code-bot

kilo-code-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

Kilo Code Review could not run — your account is out of credits.

Add credits or switch to a free model to enable reviews on this change.

@Gio2050
Gio2050 merged commit 17bed66 into main Aug 6, 2026
4 of 5 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