Skip to content

Index Forge incidents for listing and stats#15

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

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
Copy link
Copy Markdown
Owner

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

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

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