test(operator-trend): deepen resolution-trend corpus across the recovery depth axis (T3-2 phase 1)#111
Conversation
…very-tier apply helpers
There was a problem hiding this comment.
💡 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], |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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 👍 / 👎.
What
Deepens the
_build_resolution_trendcharacterization corpus from 4 → 22 scenarios, regeneratingresolution_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 skippeduv run ruff check tests/→ clean