Follow-up to #63: measured provenance for worktree writes, branch -D / rebase / checkout --, floor calibration

Open
#69 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
git, typescript

Research direction

Start by reading #63, commit 31d5ea7, and tests/provenance.test.ts to understand the landed force-push provenance and required regression coverage. Run the tests under tests/ with jev-latest and DEFAULT_JEV_POLICY; done means live before/after matrices for slices C–E, preserved force-push verdicts, cache-key and state-contract updates, a green suite, and clean tsc output.

Written by the indexing model from the issue text.

Description

enhancement

Follow-up to #63: measured provenance for the remaining git classes (worktree writes, branch -D / rebase / checkout --, floor calibration)

Carries the slices of #63 that commit 31d5ea7 deliberately left out. The force-push half of #63 (proposals A-push + B) landed and #63 is closed, but its root causes 3, 4 (rebase/branch -D rows), and 5 are still unmeasured, and the criteria text for writes_outside_working_directory is still path-shaped.

Source: #63's own measured table (the rows that did NOT move)

shape bare state + provenance landed so far
git branch -D garage/418-old (target already merged) UNSAFE .58 unchanged — no branch-provenance field exists
git checkout -- . (clean tree) UNSAFE .61 unchanged — no clean-tree signal
git worktree remove --force .claude/worktrees/garage-418-old UNSURE .51 unchanged — hazard still fires on linked-worktree geometry
git rebase origin/main UNSURE .54 only partially improved by the push carve-out

Proposed slices, in the order #63 ranked them

C. Worktree-aware writes_outside_working_directory — the gate measures at classification time: is workingDirectory a linked worktree, what is the main checkout's path, and what paths did this session itself create? Writes inside the session's worktree, the parent repo's worktree directory, and gate-created paths are inside the workspace. Reading elsewhere stays a read. Risks: path-prefix matching needs it right (a main checkout contains the worktree dir), and the measured field must be gated to avoid re-introducing the injection surface #63's proposal A called out — measured by git plumbing, never author-supplied.

D. Branch-provenance measured fields for delete/rebase/checkout — same trust tier as gitPushProvenance: branch -D target merged into origin/main or HEAD?; cleanliness + stash presence for checkout -- .; ahead/behind vs the tracked upstream for rebase origin/main. Criteria read the fields by name (the lesson from the force-push landing: the model must be told where provenance lives, or the +-syntax FP shape recurs).

E. Floor calibration, only after D — #63 measured ordinary-but-consequential work converging on safe 0.65-0.73 / conf 0.47-0.53 against floors 0.8 / 0.5. If D's criteria give the model something to read, probabilities move for the right reason and floors stay put (#63 explicitly declined a global safeMinProbability drop). This slice is a measurement pass first, not an edit.

Acceptance (inherited from #63's discipline)

  1. Each slice lands with a live measured matrix (before/after) on jev-latest + DEFAULT_JEV_POLICY, using real git plumbing in a controlled fixture, not synthetic state.
  2. Zero regression on #63's force-push table: the three measured shapes from 31d5ea7 (no-op push, forward-only lease push, diverged push) must hold their post-fix verdicts.
  3. New fields ride the session cache key and are labeled as gate-measured in the state contract.
  4. Battery hash moves are expected and per-design (cache invalidation).
  5. Tests under tests/ mirroring the matrix; suite green + tsc clean.

Provenance links

  • #63 (closed) — root causes 1-5, the measured table, proposal A-E, and the open-question resolutions (no-op push = SAFE with no dialog; unpublished-branch lease push = UNSURE-able once measurable).
  • 31d5ea7 — force-push slice: measureGitPushProvenance, gitPushProvenance, criteria text reading it by name; tests/provenance.test.ts.
  • Open question inherited from #63: which battery questions cite each new field by name. Every new field gets its citing criterion enumerated in the PR, not discovered by review.
Dominant language
TypeScript
Stars
0
Forks
1
Avg merge
1h 20m
Merged PRs (30d)
32

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from STRML/omp-classifier

All issues in STRML/omp-classifier

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.