Skip to content

fix(planning): report an answered flag in interview /api/state and check record-terminal page sync #5459

Description

@kyle-sexton

No related issue: split out of #5191 after a repro pass on planning 0.46.0 (origin/main at 4d1d9d8).

Summary

Finding 15 of #5191, reported against planning 0.42.0: (a) A record-terminal answer did not appear on the already-open page. (b) /api/state reports state: open for every question regardless of whether it is answered.

Fix

Fix 15b (expose answered state or document the field). 15a stays open only if a live session reproduces it.

Verification

Repro pass on origin/main, playwright-cli driving Chromium against a copy of plugins/planning/surface/, plus round.sh, watch.sh and curl. Verdict: reproduces.

15b reproduces: per-question state is archived, stale, upstream-pending or open (question_states, plugins/planning/surface/server.py:249-330), a dependency-staleness value, never an answered flag. Live: Q1 has terminal.decision own and state: "open". Not described in README.md.

15a does not reproduce: in two live trials with the page open and the watcher lease held, record-terminal on an open question updated the page without a reload; on the timed run the card read "Accepted" about 0.3 s after the write. The push signature includes the mtime of questions.json (server.py:703-706). A miss needs the original session's conditions (busy watcher, background tab, stream cap MAX_STREAMS = 8, server.py:51).

Related

Refs #5191. #4653 tracks the commitment and export gaps behind findings 9, 17 and part of 18.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumReal value, no hard deadline; normal backlog flow.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions