Skip to content

Week 8 - M2: Status/diff performance + working-tree regression checks #56

Open

Description

@aman-a-shah

Current checkpoint (2026-11-18)

Steps

  1. Reproduce Week 7 clean/changed status and diff measurements. Include many unchanged files, one changed file, several changed files, and a larger text file; identify the repeated work that actually dominates.
  2. Fix a bounded measured cost, such as redundant tree/index reads, repeated file hashing, or line-diff work where only file status is needed. Keep the handwritten Myers algorithm and existing HEAD-tree-versus-working-files diff semantics.
  3. Avoid correctness shortcuts: same-sized content changes must still be found, including when file timestamps are preserved. Do not persist an optimization cache that makes read-only status/diff write repository state.
  4. Close remaining Week 7 output gaps on the completed pull/merge workflow. Keep staged, unstaged, and untracked results distinct; staged-then-edited files appear in both relevant sections. Use the agreed M3 helper for pending/unresolved merge information rather than a placeholder or duplicate parser.
  5. Recheck diff headers/context, additions/deletions, mode-only changes, binary summaries, empty files, missing final newlines, and Unicode/space-containing paths. Output remains deterministic and readable when redirected.
  6. Preserve checkout validation before destructive writes and explicit resolve -> add -> commit behavior, including resolution by deletion. Unsafe checkout and validation failures must retain local files and index; status/diff must not mutate objects, refs, HEAD, index, merge state, or files.
  7. Add focused regressions for fixes and contribute working-tree assertions to M4's Week 8 checkpoint. Reuse existing safety and integration helpers instead of copying whole suites.
  8. Record comparable before/after results in docs/performance.md and update README examples to match actual output. If profiling finds no worthwhile optimization, record that evidence and complete the remaining polish/regressions.
  9. Run scripts/quality-check.sh; open a linked PR and request teammate review. Coordinate README and shared-file edits with M3/M4.

Tests

  • Clean/unborn repositories, staged-then-edited files, additions/deletions, modes, nested paths, binary data, and missing final newlines
  • Same-size edits with preserved timestamps are detected; Myers edit results remain valid for repeated lines and larger text
  • Pull -> conflict -> unresolved status -> resolve -> add -> two-parent commit -> clean status across fresh CLI processes
  • Dirty work, untracked collisions, unsafe paths, missing/corrupt blobs, and file/directory blockers preserve the existing checkout guarantees
  • Before/after state snapshots confirm status/diff are read-only; performance timing stays outside normal CI

Done when

  • Week 7 working-tree findings are resolved or documented with evidence and a follow-up
  • Any optimization preserves results and has comparable measurements
  • Final status/diff and conflict-resolution behavior have focused regressions
  • README examples and working-tree performance results are current
  • Quality check green; PR open; review requested

Activity

  1. added
    module-2
    week-8
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

module-2week-8

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions