Skip to content

Index Forge incidents for listing and stats#15

Closed
im-sham wants to merge 1 commit into
mainfrom
codex/g359-forge-incident-index
Closed

Index Forge incidents for listing and stats#15
im-sham wants to merge 1 commit into
mainfrom
codex/g359-forge-incident-index

Conversation

@im-sham

@im-sham im-sham commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a compact .forge_incident_index.json for index-backed list, suffix lookup, and aggregate stats.
  • Route CLI and MCP incident stats/logging through index-backed helpers.
  • Retry generated incident IDs on duplicate saves and lock index updates so concurrent writes do not drop entries.

Audit Findings

  • PERF-008: Forge list/show/stats scanned the full incident tree.
  • P3-005: date-sequence generated incident IDs could collide under concurrent logging.

Verification

  • Red test: focused incident-store test run failed before implementation because get_incident_stats was missing.
  • PYTHONPATH=. /Users/shamimrehman/Projects/USMI/forge/.venv/bin/python -m ruff check .
  • PYTHONPATH=. /Users/shamimrehman/Projects/USMI/forge/.venv/bin/python -m pytest
  • PYTHONPATH=. /Users/shamimrehman/Projects/USMI/forge/.venv/bin/python -m compileall forge_cli tests
  • git diff --check

@im-sham

im-sham commented Jul 13, 2026

Copy link
Copy Markdown
Owner Author

Closing as partially superseded by #23. The generated-ID concurrency risk and CLI/MCP scan reliability work are now addressed with atomic writes, structured diagnostics, strict validation, and corruption-safe behavior. The index portion is intentionally not rebased: it would add a second mutable source of truth without the invalidation and corruption contract now required by Forge. PERF-008 remains a possible future optimization, but should return only with corpus-scale benchmarks and a rebuildable cache-only design that cannot override YAML authority.

@im-sham im-sham closed this Jul 13, 2026
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