Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# .git-blame-ignore-revs
#
# This file lists commits that should be ignored by `git blame` so the
# history doesn't bottom out on bulk reformatting passes. Each entry is
# the full 40-character SHA of a commit whose changes are purely
# mechanical (e.g., a one-shot formatter migration).
#
# To opt in once per developer:
# git config blame.ignoreRevsFile .git-blame-ignore-revs
#
# Without that config, `git blame` still works — it just shows the format
# commit as the author of every line it touched, instead of the underlying
# author. The config is recommended, not required.
#
# See `docs/maintainers/development-setup.md` for setup instructions.

# TP-193: Code-quality formatter adoption — single-pass `biome format
# --write .` across the entire taskplane codebase. Applies the rules
# locked in `biome.json` (tab indent, double quotes, trailing commas,
# semicolons, lineWidth 100, lf endings, arrow parens). 161 files
# touched; no logic changes.
f1d4533985e4853733d8f571920af8e2ac4a6cee
39 changes: 39 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Enforce LF line endings in the working tree for all platforms.
#
# Without this file, Windows developers with `core.autocrlf=true` (the default)
# get CRLF in their working tree, which conflicts with Biome's
# `formatter.lineEnding: "lf"` config and causes `npm run format:check` to
# report spurious errors (the index stores LF correctly; only the local
# working tree is wrong).
#
# `* text=auto eol=lf` tells Git: detect text files automatically, and force
# LF in the working tree regardless of the platform's autocrlf setting.
#
# This file is the canonical override for the platform-default behavior.
# Added in TP-193 fold (post-merge format-pass cleanup).

* text=auto eol=lf

# Explicit overrides for binary file types (defensive — autodetection usually
# handles these correctly, but explicit declaration prevents corner cases).
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.webp binary
*.ico binary
*.zip binary
*.tar binary
*.gz binary
*.tgz binary

# Source files: explicit LF (redundant given `* text=auto eol=lf` but improves
# discoverability when grepping `.gitattributes` for a specific extension).
*.ts text eol=lf
*.tsx text eol=lf
*.mjs text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Internal

- **Code-quality formatter adoption (TP-193):** Third of four sequenced
packets implementing the code-quality-gates spec
([`docs/specifications/taskplane/code-quality-gates.md`](docs/specifications/taskplane/code-quality-gates.md)
section 6.3). Enabled the Biome formatter and applied it once across
the entire codebase in a single mechanical commit. **Formatter rules**
pinned in `biome.json` per spec section 6.3.1: `indentStyle: "tab"`,
`indentWidth: 1`, `lineWidth: 100`, `lineEnding: "lf"`,
`quoteStyle: "double"`, `trailingCommas: "all"`, `semicolons: "always"`,
`arrowParentheses: "always"`. **Format pass** touched 161 files
(every TS/MJS file in scope) with cosmetic-only changes — line
wrapping, trailing-comma insertions, single-param arrow parens, and a
small number of quote-style switches where Biome's smart-quote rule
picked the alternative quote when the primary was inside the string.
No semantic changes. **Test resilience prep** preceded the format
pass in a separate commit: introduced `expect().toContainNormalized()`
(whitespace + bracket-padding + trailing-comma normalized substring
match) and updated 22 distinct source-grep test assertions across
~20 test files to use the helper or pre-normalize source before
matching; bumped fixed-size source-slice windows in retry-matrix,
spawn-failure-visibility, supervisor-recovery-flows, and tier0-watchdog
tests so vertically-rewrapped multi-arg calls don't push expected
needles outside the inspected window. **`tmux-reference-audit.mjs`**
was extended to skip strict-mode functional-usage detection inside
test files, because Biome's quote-style switch unmasked literal
assertion strings like `"execSync('tmux list-sessions"` that would
otherwise flag the audit. **`.git-blame-ignore-revs`** added at the
repo root listing the format-adoption commit SHA so `git blame`
doesn't bottom out on the bulk reformat; per-developer one-time
setup (`git config blame.ignoreRevsFile .git-blame-ignore-revs`)
documented in `docs/maintainers/development-setup.md`. After the
pass: `npm run format:check` exits 0; `npm run lint` exits 0
(TP-192 cleanup preserved); test suite unchanged at **3624 passing /
1 skipped / 0 failed**. The `format:check` gate flip is TP-194's scope.
- **Code-quality lint cleanup (TP-192):** Second of four sequenced packets
implementing the code-quality-gates spec
([`docs/specifications/taskplane/code-quality-gates.md`](docs/specifications/taskplane/code-quality-gates.md)
Expand Down
19 changes: 11 additions & 8 deletions bin/gitignore-patterns.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

// ─── Constants ──────────────────────────────────────────────────────────────

export const TASKPLANE_GITIGNORE_HEADER = "# Taskplane runtime artifacts (machine-specific, do not commit)";
export const TASKPLANE_GITIGNORE_NPM_HEADER = "# Pi project-local packages (if using pi install -l)";
export const TASKPLANE_GITIGNORE_HEADER =
"# Taskplane runtime artifacts (machine-specific, do not commit)";
export const TASKPLANE_GITIGNORE_NPM_HEADER =
"# Pi project-local packages (if using pi install -l)";

/**
* Required gitignore entries for Taskplane projects.
Expand All @@ -30,14 +32,15 @@ export const TASKPLANE_GITIGNORE_ENTRIES = [
".taskplane-tasks/",
];

export const TASKPLANE_GITIGNORE_NPM_ENTRIES = [
".pi/npm/",
];
export const TASKPLANE_GITIGNORE_NPM_ENTRIES = [".pi/npm/"];

/**
* All patterns that should be gitignored, used for tracked-artifact detection.
*/
export const ALL_GITIGNORE_PATTERNS = [...TASKPLANE_GITIGNORE_ENTRIES, ...TASKPLANE_GITIGNORE_NPM_ENTRIES];
export const ALL_GITIGNORE_PATTERNS = [
...TASKPLANE_GITIGNORE_ENTRIES,
...TASKPLANE_GITIGNORE_NPM_ENTRIES,
];

// ─── Pattern Matching ───────────────────────────────────────────────────────

Expand Down Expand Up @@ -74,6 +77,6 @@ export function patternToRegex(pattern) {
* @returns {boolean} True if the file matches any pattern
*/
export function matchesAnyGitignorePattern(filePath, patterns = ALL_GITIGNORE_PATTERNS) {
const regexes = patterns.map(p => patternToRegex(p));
return regexes.some(regex => regex.test(filePath));
const regexes = patterns.map((p) => patternToRegex(p));
return regexes.some((regex) => regex.test(filePath));
}
Loading