Skip to content

fix: close the final review of the shell and comment cleanup - #30

Merged
ttncode merged 4 commits into
mainfrom
fix/cleanup-final-review
Sep 16, 2026
Merged

ttncode merged 4 commits into
mainfrom
fix/cleanup-final-review

Conversation

@ttncode

@ttncode ttncode commented Sep 16, 2026

Copy link
Copy Markdown
Owner

What this changes

Fixes from the final whole-branch review of #25#29.

  • lib/pnpm.sh (pnpm_install): the cd "$dir" inside ( … ) || status=$? had no guard, and errexit is off in that position. A missing app directory ran pnpm install --no-frozen-lockfile in the caller's directory and reported success. It is now cd "$dir" || exit 1. The new tests/pnpm.bats fails without the fix and is added to test-unit.
  • lib/service.sh (apply_service_dockerfile): removes a dead found flag. The return status is unchanged on every path.
  • Docs:
    • docs/runbook/add-an-adapter.md pointed at a comment that no longer exists; it now names restore_pnpm_workspace.
    • CONTRIBUTING.md described the old lint gate; it now describes shellcheck + shfmt over every tracked shell file.
  • Comments:
    • The laravel .env.example log comment said the opposite of what the setting does; fixed.
    • Shipped ADR citations now say "toolbox ADR-…".
    • History-shaped comments in tests and drivers are rewritten in present tense.
    • Driver # shellcheck source= directives name the real shared file.

How it was verified

  • Lint: mise run lint passes (shellcheck + shfmt).
  • Tests: mise run test-runner passes, 266/266.
  • New test: tests/pnpm.bats fails with the guard reverted and passes with it restored.
  • Test files: git diff -w on the touched .bats files shows comment lines only.

Checklist

  • mise run lint passes
  • mise run test-runner passes
  • New behaviour has a test that fails without the change
  • Docs that describe changed behaviour were updated in the same commit
  • No unrelated changes

iam-truongtrungnghia added 4 commits September 17, 2026 03:02
A failed `cd "$dir"` inside pnpm_install's subshell ran on the left of
`||`, where errexit is off, so the install went on to run in the
caller's directory and reported success. Guard the cd and add a
regression test that stubs pnpm and points pnpm_install at a
nonexistent directory.
apply_service_dockerfile's `found` flag was never read for anything
that changed behaviour: `((found == 1)) || return 0` returned 0
either way.
add-an-adapter.md pointed at a comment above `reconcile=` in
`scaffold`, which no longer exists; the blind line-delete it describes
is restore_pnpm_workspace in lib/pnpm.sh now. CONTRIBUTING.md still
described the lint gate as shellcheck alone over a handful of
directories; it runs shellcheck + shfmt over every tracked shell file.
- services/shared/nest.sh: fix a sentence that no longer parses
  ("unset the first `pnpm add` below" -> "otherwise the first
  `pnpm add` below").
- adapters/laravel-{api,inertia}/.env.example: LOG_CHANNEL's comment
  had the reason backwards — it exists because storage/logs is
  unreadable in a container, not because the probe logs there.
- common/docs/mise.toml, common/mise.root.toml,
  common/pnpm-workspace.yaml: qualify bare "(ADR-00NN)" references as
  "(toolbox ADR-00NN)" — a generated project's own docs/decisions/
  ships only 0000.
- tests/new-laravel-api.bats, tests/new-project.bats, tests/service.bats,
  tests/wizard.bats, services/shared/nest.sh,
  services/mongodb/drivers/laravel.sh: rewrite history-shaped comments
  ("used to", "measured", "before this pin") in present tense as what
  they guard against.
- services/{mongodb,mysql,postgres}/drivers/*.sh and tests/service.bats:
  give every `shellcheck source=/dev/null` a fixed source= path where
  the sourced file is constant, or a same-line reason where it varies.
@ttncode
ttncode merged commit 8b6c454 into main Sep 16, 2026
21 checks passed
@ttncode
ttncode deleted the fix/cleanup-final-review branch September 16, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant