ulysses/scripts
tanmayraut45 17b62a3dba
Research CLI: alias --status complete to the stored done value (#2515)
`odysseus-research list --status complete` returns an empty result on
any real corpus. The CLI accepts `complete` as a `--status` choice (the
user-facing label), but the writer in
`services/research/research_handler.py` stores `status="done"` when a
run finishes (and the legacy `src/research_handler.py` copy does the
same). The list filter at `scripts/odysseus-research` was a literal
string compare:

    if args.status and (data.get("status") or "") != args.status:
        continue

so `--status complete` filtered every finished record out, and the user
saw nothing — even though `odysseus-research list` (no filter) listed
them fine and `show RP_ID` worked on the same files. The other
documented choices — `running`, `cancelled`, `error` — are stored
verbatim by the writer, so the surface mismatch is just on `complete`.

Add a small `_STATUS_CLI_TO_STORED = {"complete": "done"}` map and run
`data.get("status")` through `_status_matches(...)` before comparing.
The other CLI choices fall through unchanged, so the filter still
matches them verbatim. A `None` or non-string `status` (corrupt JSON)
is coerced to `""` and never matches `complete`, so a half-written
record can't sneak past the filter.

`tests/test_research_cli_status_filter.py` covers all four documented
choices, the non-string / missing status case, and pins that the
verbatim choices are NOT rewritten — a blanket mapping that turned
every CLI choice into a stored variant would just re-introduce the
empty-result bug on the running/cancelled/error paths.

Part of #2122.
2026-06-05 08:50:33 +01:00
..
_completion Odysseus v1.0 2026-05-31 23:58:26 +09:00
_lib Odysseus v1.0 2026-05-31 23:58:26 +09:00
demo_email Odysseus v1.0 2026-05-31 23:58:26 +09:00
add_hwfit_models.py Hwfit: estimate params from config.json fallback 2026-06-02 20:33:25 +09:00
check-docker-amd-gpu.sh Parse all AMD GPU check args (#1586) 2026-06-03 08:56:48 +09:00
check-docker-gpu.sh Improve Docker GPU setup diagnostics (#705) 2026-06-02 12:30:40 +09:00
claim_ownerless.py Skip invalid ownerless JSON rows (#1540) 2026-06-03 14:06:57 +09:00
diffusion_server.py Add native Windows compatibility layer 2026-06-01 15:09:47 +09:00
encode_previews.sh Odysseus v1.0 2026-05-31 23:58:26 +09:00
fix_paths.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
hf_download.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
index_documents.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
migrate_faiss_to_chroma.py Skip invalid FAISS migration JSON (#1547) 2026-06-03 14:11:49 +09:00
odysseus Require runnable dispatcher subcommands (#1585) 2026-06-03 08:56:56 +09:00
odysseus-backup Reject backup output inside data dir (#1587) 2026-06-03 08:38:27 +09:00
odysseus-calendar Handle missing calendar CLI relation (#1574) 2026-06-03 14:11:17 +09:00
odysseus-contacts Skip invalid contacts CLI rows (#1569) 2026-06-03 14:11:21 +09:00
odysseus-cookbook Reject invalid cookbook CLI state (#1531) 2026-06-03 14:11:56 +09:00
odysseus-docs Ignore non-string docs CLI content lengths (#1561) 2026-06-03 14:06:46 +09:00
odysseus-gallery Handle missing gallery album images (#1563) 2026-06-03 14:11:24 +09:00
odysseus-logs fix: logs CLI _resolve crashes on a non-string name (#1631) 2026-06-03 08:59:30 +09:00
odysseus-mail fix: odysseus-mail read crashes on an empty IMAP fetch payload (#1730) 2026-06-03 13:31:10 +09:00
odysseus-mcp Normalize stored MCP CLI JSON (#1554) 2026-06-03 14:11:35 +09:00
odysseus-memory Skip invalid memory CLI rows (#1552) 2026-06-03 14:11:42 +09:00
odysseus-notes Ignore invalid note CLI items (#1539) 2026-06-03 14:11:53 +09:00
odysseus-personal Skip invalid personal CLI index rows (#1571) 2026-06-03 14:06:42 +09:00
odysseus-preset Let preset set replace corrupt entries (#1650) 2026-06-03 14:10:58 +09:00
odysseus-research Research CLI: alias --status complete to the stored done value (#2515) 2026-06-05 08:50:33 +01:00
odysseus-sessions Normalize session CLI counters (#1578) 2026-06-03 08:57:41 +09:00
odysseus-signature Reject non-PNG signature export data (#1651) 2026-06-03 14:10:54 +09:00
odysseus-skills Skip invalid skills CLI rows (#1553) 2026-06-03 14:11:38 +09:00
odysseus-tasks Ignore non-string task CLI previews (#1559) 2026-06-03 14:06:49 +09:00
odysseus-theme Reject invalid theme CLI prefs (#1396) 2026-06-03 14:12:35 +09:00
odysseus-webhook Mask short webhook CLI tokens (#1558) 2026-06-03 14:11:28 +09:00
pr_blocker_audit.py tools: add read-only PR blocker audit helper 2026-06-04 12:51:48 +01:00
update_database.py Remove duplicate update database body (#1584) 2026-06-03 08:57:03 +09:00