Skip to content

test(operator-trend): deepen resolution-trend corpus across the recovery depth axis (T3-2 phase 1)#111

Merged
saagpatel merged 1 commit into
mainfrom
test/deepen-resolution-trend-corpus
Jun 20, 2026
Merged

test(operator-trend): deepen resolution-trend corpus across the recovery depth axis (T3-2 phase 1)#111
saagpatel merged 1 commit into
mainfrom
test/deepen-resolution-trend-corpus

Conversation

@saagpatel

Copy link
Copy Markdown
Owner

What

Deepens the _build_resolution_trend characterization corpus from 4 → 22 scenarios, regenerating resolution_trend_contract.golden.json. Pure test/golden addition — no production code changed.

Why

This is the characterize-first safety net for the upcoming recovery_state(target, *, depth) collapse of the recovery-tier apply-chain. The prior corpus exercised mainly the empty + single confirmation-leaning path. The new scenarios span the recovery depth axis — reset / reentry / rebuild / restore / rerestore — across confirmation, clearance, reversal, stale-freshness, hysteresis, and calibration states, pinning the observable 388-key payload across diverse recovery states.

Coverage

Durable golden-net line coverage of the 63 _apply_* recovery-tier helpers rises from 48/63 → 49/63 fully covered; the remaining deep-tier helpers require accumulated recovery-state and will be covered by enriched fixtures in a follow-up before their collapse.

Verification

  • uv run pytest -q → 2541 passed, 2 skipped
  • uv run ruff check tests/ → clean

@saagpatel saagpatel merged commit 11305a1 into main Jun 20, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef462b9cb7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# ------------------------------------------------------------------ #
(
"reset_reentry_confirmation_holding",
[blocked],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Seed recovery state on the live target

This case (and the later recovery-depth cases using the same raw [blocked] queue item) only puts the reset/reentry fields into historical operator_summary.primary_target; the live queue item that becomes current_primary_target is still the plain blocked item. The reset-reentry helpers gate on current-target state such as closure_forecast_reweight_direction, so regenerating the contract leaves primary_target_closure_forecast_reset_reentry_status and its persistence status as none for this scenario despite the comment claiming reentered-confirmation/holding-confirmation-reentry. That means the golden does not protect the recovery-depth branch this case was added to cover.

Useful? React with 👍 / 👎.

(
"calibration_noisy_reopened",
[blocked],
stale_history,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Use real operator_queue history for reopened case

This new scenario is supposed to exercise noisy calibration with decision_memory_status == "reopened", but stale_history is made of _snapshot(...) entries under a snapshot key while _snapshot_from_history reads operator_queue. As a result the prior runs contain no item matches, _was_resolved_then_reopened never sees the absent-then-earlier-attention pattern, and the generated golden has this case as decision_memory_status: "new" with only the medium noisy adjustment instead of the reopened extra softening. The medium reopened calibration path remains unpinned.

Useful? React with 👍 / 👎.

@saagpatel saagpatel deleted the test/deepen-resolution-trend-corpus branch June 20, 2026 14:21
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