A PR whose diff is entirely under docs/ runs zero tests, so a guard whose INPUT
is shipped prose cannot protect the PR lane of the diffs it exists to check. Its
only firing opportunity is after merge, on the shared branch -- which is how next
went red on dacae9273 while the PR that caused it (#3746) was green on every
check.
The docs-lint job in .github/workflows/docs-required.yml -- an ALREADY-REQUIRED
context -- now selects and runs the docs guards that read the specific docs files
the PR changed.
scripts/docs-guard-registry.cjs test file -> the docs paths it reads (63)
scripts/select-docs-guards.cjs pure (changedPaths, registry) -> test files
scripts/lint-docs-guard-registration.cjs drift guard, wired into lint:ci
scripts/ci-test-scope.cjs is NOT touched -- `git diff origin/next --` on it is
empty -- so #764's saving stands and its 21 pinning tests are untouched.
Selection: exact path; trailing-slash directory prefix (boundary-checked --
docs/adrenaline.md does NOT match docs/adr/, which a naive startsWith gets
wrong); and '*' for the 6 entries that walk docs/ generally or read a computed
path. Unknown maps to '*' -- guessing narrow is how a guard silently stops
running. Measured: a typo fix selects 6 of 63; docs/AGENTS.md selects 12;
docs/COMMANDS.md selects 18.
Four things this got wrong first, each found by an independent reviewer or by
probe, and each having been asserted safe in a comment:
1. The registry started as a RULE in ci-test-scope.cjs's RULES, on the theory
that classify()'s !codeChanged normalization made it inert. True for
docs-ONLY diffs; false for MIXED docs+code diffs, where codeChanged is true
and the normalization never runs:
node scripts/ci-test-scope.cjs --files "docs/a.md src/semver.cts"
with the RULE: 25 targeted_tests
origin/next: 3 targeted_tests
Category error: RULES is the scoped lane's input; a docs-guard registry is a
lane manifest for a consumer that never calls classify(). Extracted; pinned
by value.
2. The second attempt was a dedicated workflow with paths: [docs/**]. Such a
workflow never reports on a non-docs PR, so it can never be a required
context without hanging every non-docs PR -- and a non-required check does not
block a merge, so the guard would have been advisory and #3753 unfixed.
docs-required.yml already has no paths: filter, already supplies the required
docs-lint context, already computes docs_changed, and already ran one docs
guard gated on it. Generalizing that step needs no ruleset edit at all.
3. The registry and the drift lint were built from ONE path-segment heuristic, so
both were blind identically -- and blind at the guard that motivated the issue.
The reader-call regex required a character BEFORE its keyword, so a callee
named exactly read( / load( / parse( / doc( / file( / content( could never
match; and only an INLINE path.join(ROOT,'docs','X.md') argument was caught,
missing the two-step-via-variable form -- the MAJORITY spelling -- plus
template literals and concatenation. Detector 1 fired on 14 of ~450 files, so
35 genuine guards sat unregistered while the lint reported 0 violations,
including cursor-reviewer (reads docs/COMMANDS.md, asserts
.includes('--cursor')) and inventory-headings-countfree. The "accepted blind
spot" this shipped with was the common case, not a fringe.
4. With detection fixed the true population is 115 files: 63 genuine guards, 52
incidental. Running all 63 in a REQUIRED check on a one-line typo fix is the
cost #764 exists to avoid -- install.test.cjs is 7840 lines and reads exactly
one docs file, docs/AGENTS.md, for its frontmatter. Dropping it reproduces the
bug; running it for a typo elsewhere is waste. Hence the map.
Then a second review round found six more, all fixed here:
- fragment-single-edit-propagation.install.test.cjs was EXEMPTED as
"overlay fixture only". False: it reads the real docs/registries/eos.json and
asserts on a registry entry name, and reads the real ADR-0001 and asserts its
H1. A docs-only PR touching either would have gone green and red next -- #3753
shipping again, from inside the fix for it. Now registered against both paths,
and all 52 remaining exemptions were re-audited one by one.
- The SUITES-collision guard compared RAW registry keys, but run-tests.cjs strips
a leading `tests/` BEFORE its suite check. So it caught 'all' and missed
'tests/all' -- the only spelling that can actually occur, since every key
carries the prefix. One typo would have run all 824 test files inside the
required job. Now normalized the same way run-tests.cjs normalizes.
- The lint failed OPEN on an unreadable tests dir or candidate file: 0 violations,
ok:true. A guard that cannot read its input must never report success.
- The exemption ratchet gated identity only, so a baselined file that later
STARTED asserting on shipped docs stayed exempt silently -- 52 permanently blind
files. The baseline now fingerprints the docs paths each exempted file
references and fails when that set changes, naming what changed.
- The exemption marker was still honored inside a multi-line template literal in
the header window. The scanner now tracks template-literal and block-comment
state.
- `git diff --name-only | grep '^docs/'` silently dropped C-quoted non-ASCII docs
paths, making docs_changed=false a green zero-guard check. Both call sites now
pass -c core.quotepath=false.
- The run step was gated on hashFiles(), which a force-committed
.docs-guard-tests.txt would satisfy. The step now rm -f's both scratch files
first and gates on an output it sets itself.
Three empty states, deliberately distinct, because conflating them rebuilds
#3753: an empty or malformed registry HARD-FAILS; docs changed with no guard
covering them logs and skips; no docs change is already gated. The middle state
must never be expressed as an empty --files-from, which prints `no tests in suite
"all"` and exits 0 -- a green check that guarded nothing. With the current
registry that state is unreachable, because the six '*' entries always match;
the branch is kept as defensive handling for a future registry and says so.
timeout-minutes: 15 bounds the required job against a hanging fork-supplied test;
it had none. npm ci was added because the job never installed dependencies -- the
previous single-file step got away without it, the registry does not.
docs/contributing/docs-guard-registration.md documents the rule, following its
sibling cross-platform-portability-rules.md, and CONTRIBUTING.md's CI Test
Quality Checks table links to it. It is also load-bearing: without a docs/ file
in the diff this PR would not have triggered its own lane, shipping an
unexercised change to a required check.
One unrelated fix, included because this PR surfaced it and CLAUDE.md forbids
deferring a defect found while working. On this branch's first CI run,
`full test (windows-latest, 24, shard 3/3)` was CANCELLED at exactly 30 minutes;
tests were still passing 0.8s before the cancel, so it is a wall-clock timeout,
not a hang, and a cancelled job reddens `Required tests`.
The cause is not this PR's test file, which costs ~60ms. Shard composition is
unstable: adding ONE file to the unit suite reshuffled 115 of 268 files between
shards, and shard 3 drew a heavier mix. Underneath that is a real pre-existing
defect. tests/ci-test-job-timeout-budget.test.cjs requires every lane's budget to
be >= 1.5x its MEASURED cost -- "a lane that got slower must be re-budgeted, not
excused" -- and its test-full entry recorded 19m from a windows-22 shard. That is
stale. Measured on `next` with none of this PR's changes present: 26m18s (run
32614439702, windows-latest/24 shard 3/3), 23m36s and 23m17s on shard 2/3. So the
lane costs ~26m and the 30-minute cap carried 1.14x headroom, not 1.5x. The gate
had been out of compliance with its own rule; this PR was merely the file
addition that reshuffled shard 3 past the cliff.
Fixed as that file prescribes: measuredMinutes 19 -> 27 with fresh evidence, and
test-full timeout-minutes 30 -> 45. The rule's minimum for 27m is 41; 45 is
deliberately above it because the reshuffle means per-shard worst case moves run
to run, and a budget pinned to the exact minimum would be re-breached by the next
test file anyone adds. Only that one job's timeout changed; test.yml's scope,
matrix and steps are untouched, so #764's saving is unaffected.
Raising that cap let the Windows shard finish (28m45s, inside 45) and uncovered
a real failure the 30-minute cancel had been masking:
`new quick-task branch branches off origin/main (#2916)` died with
`outcome=timed_out exitCode=null`, SIGTERM, at the 15000ms bound.
tests/quick-branching.test.cjs:149 `runStep` runs a `#!/usr/bin/env bash` script
executing MULTIPLE git commands, but was bound to GIT_TIMEOUT_MS (15000) -- the
norm for a SINGLE git plumbing call. tests/helpers/timeouts.cjs already documents
this exact failure and exists to fix it: HOOK_FANOUT_TIMEOUT_MS was created after
PR #3285 recorded "outcome=timed_out exitCode=null at exactly the 15000ms probe
bound while every other lane passed the same commit", and calls that "a bound
sized for the wrong class, not a slow machine". Our failure is that case
verbatim, so both sites move to the class norm rather than to a bigger number.
The same class also failed on `next` itself 21 hours earlier -- run 32608945654,
windows-latest/24 shard 1/3, `plan touching only src/ in a submodule project
keeps worktree isolation ENABLED` -- where tests/worktree-safety.test.cjs:5845
`runGate` fans out to `git config --file .gitmodules` under a hardcoded 30000.
Fixed too, since it is a defect in the tree regardless of which branch surfaced
it.
A survey of the whole tests/ tree found the same class-mismatch at further
bash fan-out sites bound under 60000ms, and the maintainer approved sweeping
them rather than leaving them latent to surface the same way one at a time. 16
fan-out sites across 16 files now use the class norm.
The sweep is class-correctness, not raising numbers until things pass. Sites
were moved ONLY where the bash body demonstrably spawns something (git, node,
npm, a CLI); self-contained shell snippets were left where they are, and are
listed as deliberately unchanged: pure if/printf bodies (copilot-install), pure
array/case builtins (code-review-pipeline-regression:638), a documented
pure-shell gsd_run stub (host-integration), single-process hook calls
(workflow-guard:222/271/302), and a deliberately tight 5000ms fast-check hook
(gsd-write-guard.property). Nothing was lowered. process-seam.test.cjs:513
(literal 300) is untouched on purpose -- it tests timeout BEHAVIOR, so raising
it would destroy what it asserts.
Shared file-level constants were the trap here, and were handled per file rather
than by redefinition: GIT_TIMEOUT_MS has ~15 users in git-base-branch and only 1
is a fan-out; WORKTREE_TIMEOUT_MS has 16 users in worktree.test.cjs and 3 are;
PROBE_TIMEOUT_MS has several in three more files. In each the CALL SITE was
changed and the constant left alone, so no single-plumbing-call site silently
inherited a 60s bound. The one exception is hooks-opt-in.test.cjs, where
HOOK_TIMEOUT_MS has exactly one consumer -- spawnHook, the fan-out itself -- so
redefining it is identical in effect and reads better.
Only two of these sites have actually been observed failing. The rest cite that
shared class and those two run ids rather than inventing evidence of their own.
Co-authored-by: sim <sim@local>
303 lines
12 KiB
JavaScript
303 lines
12 KiB
JavaScript
/**
|
|
* Quick task branching tests
|
|
*
|
|
* Validates that /gsd-quick exposes branch_name from init and that the Step 2.5
|
|
* "Handle quick-task branching" block:
|
|
* 1. Reuses an existing branch as-is (no rebase / no reset).
|
|
* 2. When the branch does not exist, creates it from origin/HEAD's default
|
|
* branch — never off the previous task's HEAD (#2916).
|
|
*
|
|
* Assertions are behavioral (run the bash block in a fixture git repo and
|
|
* inspect git state) and structural (parse the markdown for the step's bash
|
|
* block). No `.includes()` / regex grepping of raw markdown content — see
|
|
* CONTRIBUTING.md "no-source-grep" testing standard.
|
|
*/
|
|
|
|
const { test, describe } = require('node:test');
|
|
const assert = require('node:assert/strict');
|
|
const fs = require('node:fs');
|
|
const os = require('node:os');
|
|
const path = require('node:path');
|
|
const { cleanup, readFileNormalized } = require('./helpers.cjs');
|
|
const { gitOrThrow, throwIfFailed } = require('./helpers/git-fixture.cjs');
|
|
const { runHook } = require('./helpers/process-seam.cjs');
|
|
const { HOOK_FANOUT_TIMEOUT_MS } = require('./helpers/timeouts.cjs');
|
|
|
|
const QUICK_PATH = path.join(__dirname, '..', 'gsd-core', 'workflows', 'quick.md');
|
|
|
|
/**
|
|
* Bound for every subprocess in this file: git plumbing against small mkdtemp
|
|
* fixture repos, plus the Step 2.5 bash-script run below — both orders of
|
|
* magnitude under this. #3144.
|
|
*/
|
|
const GIT_TIMEOUT_MS = 20000;
|
|
|
|
const GIT_ENV = Object.freeze({
|
|
...process.env,
|
|
GIT_AUTHOR_NAME: 'Test',
|
|
GIT_AUTHOR_EMAIL: 'test@test.com',
|
|
GIT_COMMITTER_NAME: 'Test',
|
|
GIT_COMMITTER_EMAIL: 'test@test.com',
|
|
});
|
|
|
|
function git(cwd, ...args) {
|
|
return gitOrThrow(args, { cwd, env: GIT_ENV, timeoutMs: GIT_TIMEOUT_MS }).trim();
|
|
}
|
|
|
|
/**
|
|
* Structurally extract the bash code under the "Step 2.5: Handle quick-task
|
|
* branching" heading. We:
|
|
* 1. Locate the Step 2.5 heading.
|
|
* 2. Find the next horizontal rule (`---`) that ends the section.
|
|
* 3. Concatenate every fenced ```bash block in between.
|
|
*
|
|
* No `.includes()` content checks — fenced code blocks are parsed the same way
|
|
* a markdown parser would.
|
|
*/
|
|
function extractStep25Bash() {
|
|
const content = readFileNormalized(QUICK_PATH);
|
|
const lines = content.split('\n');
|
|
|
|
let start = -1;
|
|
let end = -1;
|
|
for (let i = 0; i < lines.length; i += 1) {
|
|
if (start === -1 && /^\*\*Step 2\.5:\s*Handle quick-task branching\*\*\s*$/.test(lines[i])) {
|
|
start = i + 1;
|
|
} else if (start !== -1 && /^---\s*$/.test(lines[i])) {
|
|
end = i;
|
|
break;
|
|
}
|
|
}
|
|
if (start === -1) {
|
|
throw new Error('quick.md does not contain a "Step 2.5: Handle quick-task branching" section');
|
|
}
|
|
if (end === -1) end = lines.length;
|
|
|
|
const bashBlocks = [];
|
|
let inBash = false;
|
|
let buffer = [];
|
|
for (let i = start; i < end; i += 1) {
|
|
const line = lines[i];
|
|
if (!inBash && /^```bash\s*$/.test(line)) {
|
|
inBash = true;
|
|
buffer = [];
|
|
continue;
|
|
}
|
|
if (inBash && /^```\s*$/.test(line)) {
|
|
bashBlocks.push(buffer.join('\n'));
|
|
inBash = false;
|
|
continue;
|
|
}
|
|
if (inBash) buffer.push(line);
|
|
}
|
|
if (bashBlocks.length === 0) {
|
|
throw new Error('Step 2.5 contains no ```bash code blocks to execute');
|
|
}
|
|
return bashBlocks.join('\n');
|
|
}
|
|
|
|
/**
|
|
* Build a fixture: a bare "origin" repo with a non-`main` default branch
|
|
* (`trunk`) so the test fails if the workflow silently falls back to "main"
|
|
* instead of consulting `origin/HEAD`. The clone has `origin/HEAD` pointed at
|
|
* `trunk` and a checked-out previous-task branch carrying its own unmerged
|
|
* commit.
|
|
*
|
|
* Using `trunk` here locks in the symbolic-ref code path: if the
|
|
* implementation skips `git symbolic-ref refs/remotes/origin/HEAD` and just
|
|
* defaults to `main`, every assertion below collapses (#2921 CR nitpick).
|
|
*/
|
|
function setupFixture(defaultBranch = 'trunk') {
|
|
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-quick-branching-'));
|
|
const seedPath = path.join(root, 'seed');
|
|
const originPath = path.join(root, 'origin.git');
|
|
const clonePath = path.join(root, 'clone');
|
|
|
|
fs.mkdirSync(seedPath);
|
|
git(seedPath, 'init', '-b', defaultBranch);
|
|
git(seedPath, 'config', 'commit.gpgsign', 'false');
|
|
fs.writeFileSync(path.join(seedPath, 'README.md'), '# seed\n');
|
|
git(seedPath, 'add', 'README.md');
|
|
git(seedPath, 'commit', '-m', 'initial');
|
|
|
|
git(root, 'clone', '--bare', seedPath, originPath);
|
|
git(originPath, 'symbolic-ref', 'HEAD', `refs/heads/${defaultBranch}`);
|
|
|
|
git(root, 'clone', originPath, clonePath);
|
|
git(clonePath, 'config', 'commit.gpgsign', 'false');
|
|
git(clonePath, 'config', 'user.email', 'test@test.com');
|
|
git(clonePath, 'config', 'user.name', 'Test');
|
|
|
|
// Simulate finishing a previous quick task: branch off the default branch,
|
|
// add a commit, and stay on it (this is the failure scenario from #2916).
|
|
git(clonePath, 'checkout', '-b', 'quick/01-prev-task');
|
|
fs.writeFileSync(path.join(clonePath, 'prev.txt'), 'prev work\n');
|
|
git(clonePath, 'add', 'prev.txt');
|
|
git(clonePath, 'commit', '-m', 'prev quick task work');
|
|
|
|
return { root, clonePath, defaultBranch };
|
|
}
|
|
|
|
function runStep(bash, cwd, branchName) {
|
|
// Write the script to a sibling tempdir, not inside the repo — putting it in
|
|
// `cwd` would create an untracked file that trips `git status --porcelain`
|
|
// and steers the step into the dirty-tree path.
|
|
const scriptDir = fs.mkdtempSync(path.join(os.tmpdir(), 'gsd-quick-step-'));
|
|
const scriptPath = path.join(scriptDir, 'step25.sh');
|
|
const script = `#!/usr/bin/env bash\nset -uo pipefail\nbranch_name="${branchName}"\n${bash}\n`;
|
|
fs.writeFileSync(scriptPath, script, { mode: 0o755 });
|
|
try {
|
|
// Step 2.5's script is a bash FAN-OUT (multiple git commands in sequence
|
|
// under one `bash` interpreter), not a single git plumbing call — the
|
|
// wrong class for GIT_TIMEOUT_MS. CI hit exactly this at 15000ms on PR
|
|
// #3787 run 32668773524 (`full test (windows-latest, 24, shard 3/3)`,
|
|
// `new quick-task branch branches off origin/main (#2916)`): SIGTERM,
|
|
// outcome=timed_out exitCode=null. See HOOK_FANOUT_TIMEOUT_MS in
|
|
// ./helpers/timeouts.cjs for the class rationale.
|
|
const r = runHook(scriptPath, [], { interpreter: 'bash', cwd, env: GIT_ENV, timeoutMs: HOOK_FANOUT_TIMEOUT_MS });
|
|
throwIfFailed(r, `runStep: bash ${scriptPath}`);
|
|
return r.stdout;
|
|
} finally {
|
|
cleanup(scriptDir);
|
|
}
|
|
}
|
|
|
|
describe('quick workflow: branching support', () => {
|
|
test('workflow file exists', () => {
|
|
assert.ok(fs.existsSync(QUICK_PATH), 'workflows/quick.md should exist');
|
|
});
|
|
|
|
test('init parse list includes branch_name', () => {
|
|
// Structural: the workflow's init step (Step 2) must declare branch_name as
|
|
// a parseable field of the init JSON. Restrict the scan to the init step's
|
|
// section only — a global walk over every bash fence could be fooled by an
|
|
// unrelated step that happens to mention branch_name (#2921 CR).
|
|
const content = fs.readFileSync(QUICK_PATH, 'utf-8');
|
|
const lines = content.split(/\r?\n/);
|
|
|
|
// Locate the "Step 2: Initialize" heading and the next "Step N" heading
|
|
// that ends the section. We match the markdown bold-step convention used
|
|
// throughout quick.md: `**Step N[.M]: Title**`.
|
|
let start = -1;
|
|
let end = -1;
|
|
for (let i = 0; i < lines.length; i += 1) {
|
|
if (start === -1 && /^\*\*Step 2:\s*Initialize\*\*\s*$/.test(lines[i])) {
|
|
start = i + 1;
|
|
} else if (start !== -1 && /^\*\*Step \d+(?:\.\d+)?:\s/.test(lines[i])) {
|
|
end = i;
|
|
break;
|
|
}
|
|
}
|
|
assert.notEqual(start, -1, 'quick.md should contain a "Step 2: Initialize" section');
|
|
if (end === -1) end = lines.length;
|
|
|
|
// Within that section, look for the branch_name token inside fenced bash
|
|
// blocks AND in the surrounding markdown prose that documents the JSON
|
|
// fields. Both are part of the init contract.
|
|
let found = false;
|
|
for (let i = start; i < end; i += 1) {
|
|
if (/\bbranch_name\b/.test(lines[i])) { found = true; break; }
|
|
}
|
|
assert.ok(
|
|
found,
|
|
'Step 2 (Initialize) of quick workflow should expose branch_name as part of the init contract'
|
|
);
|
|
});
|
|
|
|
test('Step 2.5 section is present and contains executable bash', () => {
|
|
const bash = extractStep25Bash();
|
|
assert.ok(bash.length > 0, 'Step 2.5 should contain at least one bash block');
|
|
});
|
|
|
|
test('Step 2.5 runs before Step 3 (task directory creation)', () => {
|
|
const content = fs.readFileSync(QUICK_PATH, 'utf-8');
|
|
const branchingIndex = content.indexOf('Step 2.5: Handle quick-task branching');
|
|
const createDirIndex = content.indexOf('Step 3: Create task directory');
|
|
assert.ok(
|
|
branchingIndex !== -1 && createDirIndex !== -1,
|
|
'workflow should contain both branching and directory steps'
|
|
);
|
|
assert.ok(
|
|
branchingIndex < createDirIndex,
|
|
'branching should happen before quick task directories and commits'
|
|
);
|
|
});
|
|
|
|
// Run against both `main` (the conventional default) and `trunk` (a non-
|
|
// main default that exercises the symbolic-ref code path). Keeping both
|
|
// restores main coverage that was removed when the fixture switched
|
|
// wholesale to trunk in 80f14cac.
|
|
for (const defaultBranch of ['main', 'trunk']) {
|
|
test(`new quick-task branch branches off origin/${defaultBranch} (#2916)`, () => {
|
|
const bash = extractStep25Bash();
|
|
const { root, clonePath } = setupFixture(defaultBranch);
|
|
|
|
try {
|
|
const upstream = `origin/${defaultBranch}`;
|
|
|
|
assert.equal(
|
|
git(clonePath, 'rev-parse', '--abbrev-ref', 'HEAD'),
|
|
'quick/01-prev-task'
|
|
);
|
|
assert.equal(
|
|
git(clonePath, 'rev-list', '--count', `${upstream}..HEAD`),
|
|
'1',
|
|
`fixture should be 1 commit ahead of ${upstream}`
|
|
);
|
|
|
|
runStep(bash, clonePath, 'quick/02-new-task');
|
|
|
|
assert.equal(
|
|
git(clonePath, 'rev-parse', '--abbrev-ref', 'HEAD'),
|
|
'quick/02-new-task',
|
|
'Step 2.5 should switch to the new quick-task branch'
|
|
);
|
|
|
|
const inherited = git(clonePath, 'rev-list', '--count', `${upstream}..HEAD`);
|
|
assert.equal(
|
|
inherited,
|
|
'0',
|
|
`new quick-task branch must branch off ${upstream}, but inherited ${inherited} commit(s) from previous-task HEAD`
|
|
);
|
|
assert.equal(
|
|
git(clonePath, 'rev-parse', 'HEAD'),
|
|
git(clonePath, 'rev-parse', upstream),
|
|
`new quick-task branch tip must equal ${upstream} tip`
|
|
);
|
|
} finally {
|
|
cleanup(root);
|
|
}
|
|
});
|
|
}
|
|
|
|
test('Step 2.5 reuses an existing quick-task branch instead of forking again', () => {
|
|
const bash = extractStep25Bash();
|
|
const { root, clonePath } = setupFixture();
|
|
|
|
try {
|
|
// Pre-create the target branch off origin/trunk with its own commit, then
|
|
// walk away to a different branch — the step must switch back to it.
|
|
git(clonePath, 'checkout', '-B', 'quick/02-new-task', 'origin/trunk');
|
|
fs.writeFileSync(path.join(clonePath, 'task02.txt'), 'task 2 work\n');
|
|
git(clonePath, 'add', 'task02.txt');
|
|
git(clonePath, 'commit', '-m', 'task 02 wip');
|
|
const task02Sha = git(clonePath, 'rev-parse', 'HEAD');
|
|
git(clonePath, 'checkout', 'quick/01-prev-task');
|
|
|
|
runStep(bash, clonePath, 'quick/02-new-task');
|
|
|
|
assert.equal(
|
|
git(clonePath, 'rev-parse', '--abbrev-ref', 'HEAD'),
|
|
'quick/02-new-task'
|
|
);
|
|
assert.equal(
|
|
git(clonePath, 'rev-parse', 'HEAD'),
|
|
task02Sha,
|
|
'existing-branch tip must be preserved (no rebase/reset)'
|
|
);
|
|
} finally {
|
|
cleanup(root);
|
|
}
|
|
});
|
|
});
|