Skip to content

feat: add persistent module map#86

Merged
fazxes merged 2 commits intomainfrom
feat/persistent-module-map
Apr 5, 2026
Merged

feat: add persistent module map#86
fazxes merged 2 commits intomainfrom
feat/persistent-module-map

Conversation

@fazxes
Copy link
Copy Markdown
Member

@fazxes fazxes commented Apr 5, 2026

Summary

  • add a generated module-map module plus the nightshift module-map CLI flow
  • wire builder/healer/docs to read and refresh docs/architecture/MODULE_MAP.md
  • record evaluation fix: run_command() timeout via reader thread #6 and update the tracker, changelog, learning, and handoff

Test plan

  • make check
  • python3 -m nightshift module-map --write

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5cf6b8668a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread nightshift/module_map.py
"""Infer the current session's handoff number from existing numbered handoffs."""
handoff_dir = repo_dir / "docs" / "handoffs"
numbers = [int(path.stem) for path in handoff_dir.glob("[0-9][0-9][0-9][0-9].md")]
next_number = max(numbers, default=0) + 1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Derive session label from existing handoff when present

_next_session_label() always returns max(handoff)+1, so once the current session has already created docs/handoffs/NNNN.md, regenerating the module map labels it as the next session (for example #0050 during session #0049). This makes Last updated and dirty-file last_changed metadata inaccurate, and it conflicts with the documented workflow where docs (including handoff) can be written before refreshing generated artifacts.

Useful? React with 👍 / 👎.

@fazxes fazxes merged commit 77e5c25 into main Apr 5, 2026
2 checks passed
@fazxes fazxes deleted the feat/persistent-module-map branch April 5, 2026 13:47
fazxes added a commit that referenced this pull request Apr 6, 2026
…x false-green

Pentest findings (session #86):

Finding 2 (CONFIRMED, FIXED):
  ALERT_CONTENT in daemon.sh was sanitized for </prompt_alert> but not
  </pentest_data>. A diff of daemon.sh appearing in the alert file (e.g.
  from a pentest-agent modification that touched the pentest_data wrapper
  lines) would contain the literal closing tag, breaking the XML boundary
  in the next builder prompt. Added a second sed -e expression to strip
  </pentest_data> to [/pentest_data], matching the existing PENTEST_REPORT
  sanitization at line 238.

Finding 1 (CONFIRMED, TASK CREATED -- #169, urgent):
  extract_result_summary only parses Claude's {"type":"result"} JSONL events.
  Codex emits {"type":"item.completed","item":{"type":"agent_message",...}}.
  PENTEST_AGENT defaults to $AGENT, so Codex daemon runs always produce an
  empty PENTEST_REPORT (false-green). Task #169 is urgent and describes
  the fix + required test coverage.

Task priority upgrades (3 security/reliability issues mislabeled low):
  #45 low->normal: shell injection pattern in cleanup_old_logs/cleanup_orphan_branches
  #84 low->normal: path traversal guard missing in readiness.py file reads
  #85 low->normal: latent IndexError crash in readiness display formatting
fazxes added a commit that referenced this pull request Apr 6, 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