Skip to content

test(cli): Retire references to the deleted phases and work-events surfaces - #5392

Merged
Sinity merged 1 commit into
masterfrom
fix/retire-session-phases-surfaces
Sep 22, 2026
Merged

Sinity merged 1 commit into
masterfrom
fix/retire-session-phases-surfaces

Conversation

@Sinity

@Sinity Sinity commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Summary

polylogue-9srtz — cluster 4 of the corpus-failure analysis. #5314 (dafcfc612, 2026-09-21) deleted session_phases/session_work_events, their CLI commands, and rewired profile_support_level. Tests still naming them were left behind.

14 of the cluster's 21 fixed. 7 refused — they are a different cause. And one genuine production omission found.

Fixed (14 + 1)

file n change
test_json_output.py 5 dropped phases/work-events from _COMMANDS, stale timeline from _EXCLUDED
test_stdout_stderr_split.py 3 dropped the three from _ALL_COMMANDS
commands/test_status.py 3 TestArchiveStatusSurfaces only — removed timeline_work_events/timeline_phases, cleaned dead row-count keys
test_confidence_vocab.py 1 _Profile double rewritten to the current SessionProfile shape (engaged_duration_ms)
test_session_insight_profiles.py 1 dropped heuristic_work_events from expected support_signals
test_session_projection_table.py 1 different cause — ModuleNotFoundError: polylogue.cli.read_views.events comes from #5374 (01:20, after #5314) moving run_read_events into session_evidence.py without updating the import

TestArchiveTableCounts was deliberately not touched — that's polylogue-1t5b5's collision class in the same file.

Refused: 7 tests are not this cluster

test_plain_cli_snapshots.py's 7 failures are inherited red at master with mixed, unrelated causes — a title_is_synthesized field added by #5362 never folded into the snapshot, plus wallclock-span and session-ordering drift in the postmortem/portfolio snapshots. None of the diffs mention phases, work-events or timeline. Making them green would mean fixing unrelated regressions under this bead's name.

So 9srtz's acceptance ("green for all 19") does not hold, and that is reported rather than manufactured.

Also found in the same file and not in the bead's list: test_session_enrichment_maps_goal_outcome_from_terminal_state fails because the /goal-session match profile.terminal_state has no case for "clean_finish"/"agent_hanging" — a pre-existing gap, unconnected.

A production omission #5314 missed

polylogue/scenarios/insight_surfaces.py (~:36-66) still declares live CliSurfaceFamily entries for slug="work-events" and slug="phases", invoking commands that no longer exist. It is only reachable via devtools scenario/devtools smoke, not the pytest corpus — which is exactly why the corpus-failure clustering could not see it. Out of this lane's declared scope, so not fixed here; filed separately.

Anti-vacuity — executed

Diff saved as a patch, all 6 files reverted with git checkout --, selection re-run, real red captured: _COMMANDS lists 'analyze insights phases'…, ModuleNotFoundError: No module named 'polylogue.cli.read_views.events', AttributeError: '_Profile' object has no attribute 'engaged_duration_ms', Extra items in the right set: 'timeline_work_events' 'timeline_phases', 'assistant_outcome_text' != 'heuristic_work_events'. The unrelated test_session_enrichment_… failure recurred identically, confirming it is inherited and not introduced by the revert. Patch reapplied and diff confirmed byte-identical.

Verification

pytest_focused (pre-fix,  job 419)   15 failed (14 target + 1 unrelated)
pytest_focused (post-fix, job 402)   245 collected, 234 passed, 11 failed
                                       -> 3 are 1t5b5's, 7 are snapshots, 1 unrelated; none mine
verify_quick (job 432)               exit 0
devtools render all --check          exit 0, no 'out of sync'
devtools schema closure (6 files)    all 'out' — no identity movement

🤖 Generated with Claude Code

https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy

#5314 (dafcfc6) deleted session_phases/session_work_events and their
CLI phases/work-events/timeline commands but left several test files
naming the deleted surfaces. Remove the dead references so the CLI
command table, MCP status-surface, and confidence-vocab tests describe
what the CLI actually exposes:

- test_json_output.py / test_stdout_stderr_split.py: drop the
  phases/work-events/timeline entries from the hand-maintained command
  tables (the anti-vacuity check at test_json_output.py:229-261 is what
  caught this; it is untouched).
- test_status.py (TestArchiveStatusSurfaces): _archive_status_surfaces
  no longer emits timeline_work_events/timeline_phases; keep the
  threads-readiness coverage the same test also carried and drop the
  now-dead work_event/phase count keys from the other fixtures in this
  class.
- test_confidence_vocab.py: profile_support_level lost its confidence
  input (#5314 rewired it to support_level(0.0, ...)); rewrite the test
  double for the real SessionProfile shape and assert the current WEAK
  invariant instead of the old phase-confidence scenario.
- test_session_insight_profiles.py: enrichment_support_signals no
  longer emits heuristic_work_events; drop it from the expected tuple.
- test_session_projection_table.py: separately, #5374 (fb84ba1, not
  #5314) moved run_read_events from cli/read_views/events.py into
  cli/read_views/session_evidence.py without updating this test's
  import path; point it at the new module.

Verified test_plain_cli_snapshots.py's 7 failures and
test_session_insight_profiles.py's
test_session_enrichment_maps_goal_outcome_from_terminal_state do NOT
reproduce as #5314 fallout (unrelated diffs: a #5362 field addition,
session-ordering/wallclock drift, and a pre-existing goal_outcome gap);
left untouched.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01ToWqpkXotr573DiQex5vcy
@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: de391e66-b616-462c-9839-6c214e530788

📥 Commits

Reviewing files that changed from the base of the PR and between 0df0f6a and 32a449a.

📒 Files selected for processing (6)
  • tests/unit/cli/commands/test_status.py
  • tests/unit/cli/test_json_output.py
  • tests/unit/cli/test_stdout_stderr_split.py
  • tests/unit/insights/test_confidence_vocab.py
  • tests/unit/mcp/test_session_projection_table.py
  • tests/unit/storage/test_session_insight_profiles.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-22T05:29:30.695582Z 32a449a PR opened
🔒 Security Review ✅ Completed 2026-09-22T05:32:06.594488Z 32a449a PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Sinity
Sinity enabled auto-merge (squash) September 22, 2026 05:26
@Sinity
Sinity merged commit cacbc43 into master Sep 22, 2026
3 checks passed
@Sinity
Sinity deleted the fix/retire-session-phases-surfaces branch September 22, 2026 05:43
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