Skip to content

test(test): expand onboarding harness for 2026-04-27 fresh-vm findings - #2334

Merged
bpamiri merged 1 commit into
developfrom
claude/nervous-khorana-826298
Apr 27, 2026
Merged

bpamiri merged 1 commit into
developfrom
claude/nervous-khorana-826298

Conversation

@bpamiri

@bpamiri bpamiri commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Surfaces six new fresh-VM findings (#2327-#2333) as harness phases that SKIP with issue refs while bugs are open and auto-flip to PASS once fixed. Also fixes Phase 9's broken regex (false PASS on `0 passed`) and tightens Phase 3/4 detection so the harness can distinguish silent-success bugs from real success.

Phase changes

Why now

The 2026-04-27 fresh-VM run surfaced 16 onboarding findings; six of them weren't yet covered by the harness. Adding them as SKIP-clean phases tied to tracked issues means:

  • Each future fix-PR can claim "Phase X flips to PASS" as concrete evidence
  • Regressions surface as FAIL the moment they land
  • We can iterate against `bash tools/test-onboarding.sh` locally instead of waiting for fresh-VM runs

Notable side-finding

While building Phase 13, I uncovered a separate `wheels destroy` bug — `wheels destroy WidgetTest controller` mangles the name to `Widgettests.cfc` (lowercase + plural-s) and fails with "Not found." This is structurally distinct from #2330 (which is about views being left behind). Phase 13 references it as "related to #2330" with a comment; could split into its own issue if helpful.

Test plan

  • `bash tools/test-onboarding.sh` runs end-to-end in ~2 min
  • Score: 36 pass / 1 fail / 7 skip / 44 total
  • Single FAIL is the existing `wheels.SemVer` regression in Phase 7 (unchanged from before this PR)
  • Phase 9 flips PASS→SKIP — confirms the false-green is fixed
  • All new phases (11-15) emit SKIP with the correct issue ref

🤖 Generated with Claude Code

Surface six new fresh-VM findings (#2327-#2333) as harness phases that
SKIP with issue refs while bugs are open and auto-flip to PASS on fix.
Also fix Phase 9's broken regex (false PASS on `0 passed`) and tighten
Phase 3/4 detection so the harness distinguishes silent-success bugs
from real success.

- Phase 2: detect misplaced create-line paths in `wheels new` output
  (e.g. `Model.cfc`, `migrator/`, `mailers/` printed without app/
  prefix) — issue #2328
- Phase 3: grep homepage body for `DI.CircularDependency` rather than
  trusting HTTP 200 alone — issue #2331
- Phase 4: assert per-migration progress line in `wheels migrate`
  output, since exit-0-without-progress masks JDBC-class-miss — #2315
- Phase 9: replace broken `0 passed` regex (was producing false PASS)
  with explicit non-zero-count check — issue #2318
- Phase 11 (new): `wheels generate scaffold` over existing model — #2327
- Phase 12 (new): `wheels browser install` fetches Playwright — #2332
- Phase 13 (new): `wheels destroy` controller removes views — #2330
- Phase 14 (new): `wheels generate model` template formatting — #2329
- Phase 15 (new): dev toolbar shows real version not 0.0.0-dev — #2333

Score: 36 pass / 1 fail / 7 skip / 44 total. Single FAIL is the
existing wheels.SemVer regression already tracked in Phase 7.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bpamiri
bpamiri merged commit e650234 into develop Apr 27, 2026
3 checks passed
@bpamiri
bpamiri deleted the claude/nervous-khorana-826298 branch April 27, 2026 16:45
bpamiri added a commit that referenced this pull request Apr 27, 2026
…in CLI context (#2341)

After #2309 fixed the broader cli.lucli.* dotted-path resolution, a
follow-on regression remained:

    $ wheels packages list
    Error: lucee.runtime.exp.ApplicationException:
    could not find component or class with name [wheels.SemVer]

VersionResolver.init() was instantiating `new wheels.SemVer()`. That
dotted path requires a `/wheels` mapping registered against the running
Lucee application context. Such a mapping IS present inside a Wheels
app's HTTP request context (the user app's Application.cfc registers
it), but NOT in the LuCLI dispatch context — `wheels packages list`
runs from LuCLI's LuceeScriptEngine before any Wheels app is booted.

Tried registering `/wheels` at runtime via
`getPageContext().getApplicationContext().addMapping(...)` — the call
appeared to succeed but the mapping never took effect in subsequent
component resolution, suggesting LuCLI's classloader uses a different
path than the request-time mapping cache. Reverted that approach.

Pragmatic fix: mirror SemVer.cfc into cli/lucli/services/SemVer.cfc and
load it via `modules.wheels.services.SemVer` — the `modules.wheels`
mapping is what makes every other lucli service resolve, so this path
always works. The framework's PackageLoader continues to use
`wheels.SemVer` unchanged (it runs in app context where the original
mapping is fine).

Cost: 189 lines duplicated. Mitigation: header note on the mirror
asking maintainers to keep it in sync when SemVer semantics change.
The file is small, stable utility code (no transitive deps), and
duplicate-with-divergence-warning beats a runtime-mapping hack that's
fragile across Lucee/Adobe and across future LuCLI engine updates.

Fixes the Phase 7 follow-on regression. Harness now reports
41 pass / 0 fail / 4 skip / 45 total — the first 0-FAIL state since
the meter expansion in #2334.

Test plan:
- bash tools/test-cli-local.sh — 447 pass / 3 fail / 0 error. Three
  failures are pre-existing Doctor Service issues (#2260) unrelated.
- bash tools/test-onboarding.sh Phase 7 flips FAIL -> PASS:
  "wheels packages list exited 0" + "produced sensible output".
bpamiri added a commit that referenced this pull request Apr 29, 2026
`gh pr merge` exits non-zero when its post-merge fast-forward step
fails on the local clone, even when the server-side merge AND branch
deletion both succeeded. The most common trigger: the default branch
is checked out in a sibling git worktree, producing

    failed to run git: fatal: 'develop' is already used by worktree
    at '/path/to/main/clone'

This breaks the script's whole reason to exist when run from a
worktree-based setup (which a cron task on a developer's machine
typically is): every successful merge would be misreported as a
failure, and the cron's exit code 1 would mean "actual failure"
mixed with "false-positive failure" indistinguishably.

Fix: after `gh pr merge` returns, re-query PR.state. If MERGED,
treat as success regardless of `gh`'s exit code, and surface the
cosmetic error to the operator as a warning rather than a failure.
The actual merge-failure path (state != MERGED) still logs `gh`'s
output and returns 1.

Discovered while dogfooding the script on its own merge (PR #2370)
from this worktree. The merge succeeded server-side, the remote
branch was deleted, the merge SHA was retrievable — but the script
reported "merge command failed" and exited 1 because of `gh`'s
non-zero exit. A cron tick at the moment of that merge would have
both merged the PR and reported failure.

Per `commitlint.config.js` `scope-enum`, this is scoped `test`
following the precedent for `tools/` scripts (e.g. #2366, #2334);
`tools` itself is not in the allowlist.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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