feat(memory): temporal facts, knowledge history, cmd timeout + cancel fix - #54
feat(memory): temporal facts, knowledge history, cmd timeout + cancel fix#54chinkan wants to merge 4 commits into
Conversation
… fix - Knowledge history via SQLite UPDATE/DELETE triggers; timeline + as_of queries - Temporal facts (entity/relation/value/valid_from/valid_to); one active per pair - MCP tools: add_fact, query_facts, close_fact, fact_history - execute_command wall-clock timeout (default 90s, config 0=off) - Fix Cancel button: CallbackQuery bypasses per-chat serialization Deferred: agentic RAG (#52), harness evolution (#53)
Trigger anomalyco/opencode on issue and PR review comments starting with /oc or /opencode.
Runs opencode on opened/synchronize/reopened/ready_for_review without needing /oc.
|
Both axes' key claims verified against source ( StandardsSQL injection: none found. All new queries in Security (timeout/cancel): Default 90s cap tightens sandbox behavior; Documented-standard issues
Baseline smells (judgement calls)
Spec(a) Missing / partial
(b) Scope creep
(c) Implemented but looks wrong
Summary: Standards — 6 findings, worst: unpinned |
- Register cancel before showing Cancel button (race under concurrent callbacks) - Include partial stdout/stderr on timeout/cancel for the LLM - UNIQUE one-active fact index; backfill inserts without inverted windows - Normalize date-only timestamps for as_of / valid_from compares - Expose knowledge_as_of via fact_history(category,key,as_of) - Drop unused search_facts; supervisor shell respects job.timeout_secs - opencode workflows: write perms, checkout@v4; ADR wording (valid-time)
|
Addressed opencode review findings:
Skipped (YAGNI): pin |
|
Both sub-agent reports verified against source. Spot-checks confirmed: cancel PR #54 Re-Review (post-fix, @ 4406413)StandardsPrior-finding verification
Hard documented-standard violation
Baseline smells (judgement)
SpecPrior-finding verification
Worst — finding 3 (spec line: "sandbox.execute_timeout_secs default 90, 0 = off"): the timeout was added to Minor gaps
Scope creep (unchanged)
Summary: Standards — 3 open (1 hard: stale CLAUDE.md test claim; worst: duplicated |


Summary
knowledge_timeline/knowledge_as_of(entity, relation, value, valid_from, valid_to); one active per pair; auto-close on new valueadd_fact,query_facts,close_fact,fact_historysandbox.execute_timeout_secsdefault 90,0= offCallbackQueryno longer chat-serialized behind in-flightexecute_command(root cause of dead Cancel)Deferred
Docs
CONTEXT.mdmemory glossaryTest plan
cargo test(incl. 6 new memory/knowledge unit tests)cargo clippy -- -D warningssleep 120→ timeout ~90sfact_history(category,key)shows archive