You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The resume rollout-fork detector landed in #9 without unit tests (the agent-code repo convention is no new test files in feature/fix PRs). It is the most logic-dense and most testable part of that change.
Surface to cover (src/CodexHeadless.ts, src/proxy/CodexResponsesAdapter.ts):
collectRolloutLineageIds — id extraction, session_meta exclusion, cap.
normalizeCwd — symlink / case / .. / trailing-slash canonicalisation.
The resume rollout-fork detector landed in #9 without unit tests (the agent-code repo convention is no new test files in feature/fix PRs). It is the most logic-dense and most testable part of that change.
Surface to cover (
src/CodexHeadless.ts,src/proxy/CodexResponsesAdapter.ts):collectRolloutLineageIds— id extraction,session_metaexclusion, cap.normalizeCwd— symlink / case /../ trailing-slash canonicalisation.isResumeForkCandidate— mtime guard, cwd match, lineage-overlap threshold, empty-lineage fail-closed, same-cwd-no-lineage rejection.watchResumeForkRollout— a fork created before, during, and after attach is all evaluated (the priming-race regression fix(codex): correct rollout tail ownership so the committed feed keeps growing #9 fixed).CodexResponsesAdapter— a'completed'flow drops late chunks and is reaped.Some of these may need light extraction to be test-addressable.
isResumeForkCandidateand the lineage helpers are close to pure already.Refs #9, Juliusolsson05/agent-code#159.