Summary
hooks/session-end.js silently records nothing when a session only creates untracked files.
Verified on main at 3048fb73910a0a8944f74fb2e70abd5752a60b2f.
Reproduction
- Create a temporary Git repository with an initial commit.
- Create
new-feature.js but do not stage it.
- Confirm
git status --short reports ?? new-feature.js.
- Run
hooks/session-end.js with isolated COPILOT_WORKSPACE_DIR, MEMORY_GRAPH_PATH, and hook state paths.
Actual result
The hook emits {}, does not create the memory graph, and logs:
Session end: nothing recorded (no changes detected this session).
Expected result
A session that creates new source files should produce an outcome record. At minimum, untracked paths should participate in the change-presence check and summary.
Cause
hooks/session-end.js:114-137 only collects git diff and git diff --cached. Neither includes untracked files. Lines 303-315 then treat both empty outputs as no changes.
Impact
New features or scaffolding created entirely as new files are silently omitted from evolution memory.
Summary
hooks/session-end.jssilently records nothing when a session only creates untracked files.Verified on
mainat3048fb73910a0a8944f74fb2e70abd5752a60b2f.Reproduction
new-feature.jsbut do not stage it.git status --shortreports?? new-feature.js.hooks/session-end.jswith isolatedCOPILOT_WORKSPACE_DIR,MEMORY_GRAPH_PATH, and hook state paths.Actual result
The hook emits
{}, does not create the memory graph, and logs:Expected result
A session that creates new source files should produce an outcome record. At minimum, untracked paths should participate in the change-presence check and summary.
Cause
hooks/session-end.js:114-137only collectsgit diffandgit diff --cached. Neither includes untracked files. Lines 303-315 then treat both empty outputs as no changes.Impact
New features or scaffolding created entirely as new files are silently omitted from evolution memory.