Skip to content

session-end: untracked-only changes are silently ignored #2

Description

@LeonEvo1103

Summary

hooks/session-end.js silently records nothing when a session only creates untracked files.

Verified on main at 3048fb73910a0a8944f74fb2e70abd5752a60b2f.

Reproduction

  1. Create a temporary Git repository with an initial commit.
  2. Create new-feature.js but do not stage it.
  3. Confirm git status --short reports ?? new-feature.js.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions