Repository navigation
fix: first-run consumer friction after npm setup (consumer proof) - #131
PatrickSys wants to merge 1 commit into
Conversation
Filter bootstrap paths from canonical_dirty warnings, stop next from pointing at a missing hardcoded research file, gitignore vendored .work/bin helpers so repo linters ignore them, and print setup (not init) in the setup entry banner. Co-authored-by: Patrick Rosselló Colom <PatrickSys@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 59267f5b91
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ensureGitignoreEntry(initCtx.cwd, `${stateDirName}/`, ` - ensured ${stateDirName}/ is gitignored`); | ||
| } | ||
| ensureGitignoreEntry(initCtx.cwd, `${stateDirName}/.local/`, ` - ensured ${stateDirName}/.local/ is gitignored`); | ||
| ensureGitignoreEntry(initCtx.cwd, `${stateDirName}/bin/`, ` - ensured ${stateDirName}/bin/ is gitignored`); |
There was a problem hiding this comment.
Preserve the helper runtime for cloned workspaces
With the default commitDocs: true, this ignore entry causes a committed workspace to retain its skills and configuration but lose the runtime those skills invoke when cloned. I reproduced this with setup → commit → clone: .agents/skills/work-plan/SKILL.md and .work/config.json exist in the clone, but .work/bin/gsdd.mjs does not. Generated workflows such as distilled/workflows/verify.md require node .work/bin/gsdd.mjs lifecycle-preflight ..., which now fails with MODULE_NOT_FOUND until someone manually reruns setup/update. Keep the runtime trackable or provide a bootstrap mechanism before making the generated workflows depend on ignored files.
Useful? React with 👍 / 👎.
|
|
||
| function nonBootstrapDirtyCounts(worktree) { | ||
| const tracked = (worktree.dirty?.tracked || []).filter((entry) => !isWorkspineBootstrapRepoPath(entry)).length; | ||
| const untracked = (worktree.dirty?.untracked || []).filter((entry) => !isWorkspineBootstrapRepoPath(entry)).length; |
There was a problem hiding this comment.
Count non-bootstrap changes before truncating dirty buckets
When more than 200 untracked bootstrap files precede an application file in Git status, this calculation silently loses the application change: readGitWorktree caps each displayed bucket at MAX_DIRTY_BUCKET_ENTRIES, so filtering that array is not a reliable dirty count. I reproduced this with 201 untracked .work/ files plus production.js: the map reports 202 untracked files and two omitted entries, but emits no canonical_dirty warning or intervention. Compute the filtered count from the complete status data before capping the output, or conservatively account for omitted entries.
Useful? React with 👍 / 👎.
Consumer proof (Task A)
Target repo: fresh clone of sindresorhus/is (~2.3MB). Workspine:
npx -y workspine@0.35.3 setup -y, then the same loop using anpm packfrom this branch. Agent CLI: none on the VM (no Claude/Codex/Cursor agent binary); I ran the brownfield ceremony manually as the agent (work-plan content →lifecycle-transitionplan/approve/execute/verify helpers).Change under proof: add
is.nonZeroNumber(+ assert, readme, tests). Result: typecheck + 119/119 node tests pass; brownfield plan approved withconsumer-proof-owner-5196, execute + verify transitions completed (posture/verify steps needed a second verify after CHANGE edits—worth documenting).Friction observed (ranked)
gsdd next --jsonpointed at a non-existent file —artifacts_to_readincluded hardcoded.work/research/2026-06-20-long-term-agent-harness-consistency.mdon a fresh setup.repo_warningsreported ~79 untracked files immediately after Workspine init (mostly.work//.agents//goal.md)..work/bin/broke the host linter —xoscanned copiedbin/lib/*.mjsand reported thousands of errors;npm testfailed until running tsc/tests without xo.initwhile the user rannpx workspine setup(cosmetic but confusing).nextcopy in.work/binstill uses the harsher “incomplete lifecycle truth” copy vs main’s brownfield lane hint (helpers pinned at install time).Fixes in this PR (top 3 + banner)
nextonly lists artifact paths that exist on disk (drops phantom research file).control-mapignores Workspine bootstrap paths (.work/**,.agents/**,goal.md,AGENTS.md) when emittingcanonical_dirty..work/bin/to root.gitignoreso repo-wide JS linters skip vendored helpers.setuppasses--invoked-as setupso the banner readsworkspine setup - setting up your workspace.Tests
node tests/run-all.cjs— 30/30 GREEN on this branch.Task B (PR comments posted)