Repository navigation
Keep drafts and fixes watched; stale drafts and Re-analyze - #32
Merged
Merged
Conversation
The thread re-check covers pinned items whatever their status and age: an
unsent reply draft, a dispatched fix whose session is not closed, or an
investigation. Pinned items go first within recheck_max_per_cycle and keep
their replies. The dispatched session's observed state is stored on
fix_handoff.dispatch.state so the poller can tell.
reply_draft.stale ({since, new_replies}) is set by the re-check when replies
arrive after the draft, judged once at load for existing drafts, and starts
null on every rewrite. The record tool refuses it.
The Board shows "N new replies since draft" on the row, marks newer replies
"new" in the detail view with a warning above Send to thread, sorts stale rows
first within a priority, and shows "replies · last HH:MM" on dispatched fixes.
Re-analyze N stale (and Re-analyze this) is the only way a draft changes after
the Lead's first look: POST /items/reanalyze hands the Lead ONE prompt for up
to 20 items, stamps reanalyze_requested_at, records a crew event, and is
refused while a request is in flight. No poll or timer sends it.
Brief v8, README (both halves), CHARTER, CONTRACT; app 0.9.6.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two owner complaints, both verified on the live ledger: dispatched fixes stop getting thread re-checks once resolved or older than 7 days (3 of 15 dispatched items were 18–22 h stale), and 30 of 63 unsent drafts are older than the thread's newest reply, with nothing on the Board saying so.
reply_draft, a dispatched fix whose session is not closed (fix_handoff.dispatch.state, stored bydispatch.record_stateson every poll and/needsread), orstatus == investigating. Pinned items are re-checked whatever their status andrecheck_days, go first withinrecheck_max_per_cycle, and keep theirreplies.reply_draft.stale = {since, new_replies}is set by the re-check, judged once at load for existing drafts, and startsnullon every rewrite; a send clears the draft.slack_radar_recordrefuses it.N new replies since draft; in the detail view newer replies are marked new and a warning sits above Send to thread (still one click); stale rows sort first within a priority; dispatched fixes showreplies · last HH:MM.POST /items/reanalyze(≤20 keys, owner only). The app hands the Lead ONE prompt on its own slot (owner-message path), stampsreanalyze_requested_at, records acrewevent, and refuses with 409 while a request is in flight (until each item moves or 10 min). No poll or timer sends it; the Lead never posts. Brief v8 has a matching section and tells the Lead to leave drafts alone on ordinary thread updates.Tested
python -m pytest tests -q -p no:cacheprovider: 329 passed (newtests/test_stale_drafts.py: pinned re-check past the horizon and while resolved, unpinned resolved skipped, closed dispatch unpins, pinned-first ordering, replies kept, stale set/cleared/migrated, record tool refuses app-only fields,/needsstale fields and sort,/items/reanalyzeone prompt with ≤20 keys, 409 in flight, owner gate, paused crew undoes stamps).npm run buildclean;ui/dist/index.mjsregenerated.newmarkers, Send posts once,Re-analyze 2 staleposts/items/reanalyzeonce with 2 keys and then readsRe-analyzing…). PNGs regenerated.