Skip to content

stdio and streamable-http containers#1

Merged
Simon-McIntosh merged 8 commits into
iterorganization:mainfrom
Simon-McIntosh:main
Jun 13, 2025
Merged

stdio and streamable-http containers#1
Simon-McIntosh merged 8 commits into
iterorganization:mainfrom
Simon-McIntosh:main

Conversation

@Simon-McIntosh

Copy link
Copy Markdown
Collaborator

Lexicograpic indexing of the IMAS DD implemented and exposed via the MCP using stdio and streamable-http transport

@Simon-McIntosh
Simon-McIntosh merged commit db8217c into iterorganization:main Jun 13, 2025
1 check passed
Simon-McIntosh added a commit that referenced this pull request Dec 17, 2025
stdio and streamable-http containers
Simon-McIntosh added a commit that referenced this pull request May 6, 2026
Major rewrite of plan 36 (catalog quality refactor):

- Phase 0 (NEW): ISN postfix grammar inversion (rc22). Unifies vector
  and complex parent/part under ONE rule: modifiers strip right-to-left
  from closed reserved vocab. Resolves RD round 2 finding #1
  (vector/complex false-symmetry) by eliminating the asymmetry.
- Phase 2 (REWRITTEN): linking workflow rebuild targeting 11 bugs
  discovered via investigation + empirical graph query (all 927 names
  have 0 links, link_status=None). Fixes:
  B1 _sanitize_links dd: junk-strip (RD #4 BLOCKING)
  B2 contradictory LLM instructions (enrich_system vs style guide)
  B3 zero-link bootstrap failure (consequence of B1+B2)
  B4 no vector/complex sibling auto-populate (user req)
  B5 link_status never reaches unresolved
  B6 over-strict missing_reverse audit for parent/component
  B7 _sanitize_links drops name:X during bootstrap (chicken-egg)
  B8 no DD-path context in LLM prompt
  B9 no failed-link re-queue on new SN writes
  B10 # in junk-strip collides with URL fragments
  B11 DD cluster-peer link candidates unused
- Phase 1b export field-exclusion mechanism CREATED (did not exist).
- Phase 1c doc_resolution_status field added parallel to link_status.
- Phase 4b small cost-bound verifier run (equilibrium, 20 names, $2)
  with explicit gate criteria before opening taps.
- Phase 4d generalised sn bootstrap-derived-parents (vector+complex).
- RD round 2 non-grammar findings merged (#1b, #1d, #1e, #4, #5, #6,
  #7, #8a, #8b).

Status: PLANNING, RD round 3 pending.
Simon-McIntosh added a commit that referenced this pull request May 6, 2026
Smoke #1 surfaced a silent telemetry blackhole: BudgetManager writer
task wedged on a sync Neo4j call inside record_llm_cost, dropping 14
minutes of LLMCost telemetry. SIGINT/SIGTERM did not finalize the
SNRun row.

Writer hardening (budget.py):
- record_llm_cost wrapped in asyncio.wait_for(asyncio.to_thread, 20s)
- Heartbeat via wait_for on queue.get (60s, INFO when pending, DEBUG when idle)
- Locked crash-detect+recreate of _writer_task in _enqueue_write
- _write_dropped counter, surfaced in drain summary

Shutdown hardening:
- drain_pending bounded by DRAIN_TIMEOUT=30s; on timeout, cancel writer
- finalize_sn_run, release_all_orphan_claims, get_total_spent all wrapped
  in to_thread + wait_for so a wedged Neo4j cannot block shutdown
- SIGTERM handler registered (symmetric to SIGINT cooperative shutdown)
- 2nd-SIGINT watchdog grace 5s -> 45s (must outlast drain + finalize)

Tests: 9 new (test_writer_resilience.py + test_finalize_on_signal.py)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant