This repository was archived by the owner on Jul 16, 2026. It is now read-only.
Repository navigation
Phase 5.22: task_archive helper + bridge archive wiring (sync OSS sutando) - #90
Merged
Merged
Conversation
…ando)
When a core claims a task, claim_task.py renames task-{id}.txt to
task-{id}.claimed-core-N.txt. Bridge archive calls that hard-code the
bare path silently no-op after claiming, leaving stranded claimed files
in tasks/ forever (sonichi#933).
Ports OSS sutando's 32-line task_archive.py helper and wires all three
bridges (discord, telegram, slack) to use find_task_file() at every
task archive site — matching OSS call patterns:
- Reply/skip paths: find_task_file(...) or bare fallback
- dm-fallback paths: find_task_file(...) with if _task_file guard
Also ports task-archive.test.py (5 cases) and adds task_archive.py to
the state-paths adoption allowlist (pure locator — takes tasks_dir from
caller, never resolves workspace itself).
Verification: 63/63 Python tests pass.
Co-authored-by: Cursor <cursoragent@cursor.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Ports OSS
task_archive.pyand wires all three bridges to usefind_task_file()when archiving task files. When a core claims work,claim_task.pyrenamestask-{id}.txt→task-{id}.claimed-core-N.txt. Archive calls that hard-code the bare path silently no-op after claiming, leaving stranded.claimed-core-*files intasks/forever (sonichi#933).What changes
src/task_archive.py(new): 32-line pure locator helper — checks bare name first, then globs*.claimed-core-*.txtsrc/discord-bridge.py: import + 7 archive sites updated (reply path, skip path, dm-fallback empty/stale/suppression/redirect/success paths)src/telegram-bridge.py: import + 2 archive sites updatedsrc/slack-bridge.py: import + 1 archive site updatedtests/task-archive.test.py(new): 5 cases ported from OSStests/state-paths-adoption.test.py: allowlist entry (pure locator — takestasks_dirfrom caller)Call patterns (match OSS)
Why minimal divergence
Test plan
task-{id}.txtreturned when presentPhase context
Made with Cursor