Repository navigation
feat(tests): opt-in NATIVEAPPTEMPLATE_TESTS=1 runs the generated apps' test suites - #154
Merged
Merged
Conversation
…' test suites SPEC §4 Operation 3 says the suites must pass, but Layer 2 only builds. A rename can break a test without breaking the build: an Orange Baton run passed the report while 1 of 1,117 iOS tests failed. With NATIVEAPPTEMPLATE_TESTS=1, Layer 2 runs in build mode and, after the visual phase and self-repair, the agent runs bin/rails db:test:prepare + bin/rails test (mise exec when available), xcodebuild test (Layer 2's scheme/destination/configuration) and ./gradlew testDebugUnitTest in parallel. Results (status, command, exit, the runner's summary line, output tail) go to platforms[].tests in report.json, a "Test suites" section and gate chip in the HTML report, and the trace. A failing suite fails the run. Off by default; SPEC, README, AGENTS.md, the output checklist and the generate-app skill now say the suites don't run unless asked. runStep keeps only the last ~1 MB of output (xcodebuild test logs are large). Closes #150 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UZJxUoubntzu7Ec7DPVfAr
dadachi
force-pushed
the
feat/autoformat-after-rename
branch
from
October 18, 2026 00:19
5ab2ec3 to
5102367
Compare
dadachi
force-pushed
the
feat/opt-in-test-suites
branch
from
October 18, 2026 00:19
9805a9c to
82a9820
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #150
What
SPEC §4 Operation 3 says
bin/rails test,xcodebuild testand./gradlew testmust pass, but Layer 2 only builds. I took the preferred option from the issue: an opt-in flag, plus docs saying the suites don't run by default.NATIVEAPPTEMPLATE_TESTS=1(alsoon/true):VISUAL>=1does).xcodebuild testdoesn't compete with Stage 1/2 for the simulator) and after self-repair (so the suites test the final code), runs these in parallel:bin/rails db:test:preparethenbin/rails test(mise exec --when mise is available)xcodebuild -project <P>.xcodeproj -scheme <P> -destination $NATIVEAPPTEMPLATE_IOS_DESTINATION -configuration Debug test(same as the Layer 2 build, so the build is reused)./gradlew testDebugUnitTest --no-daemon(JVM, no emulator)src/validation/test-suites.ts:testsEnabled,runTestSuite,extractSummary(Minitest / XCTest / Swift Testing / xcodebuild / Gradle summary lines),applyTestResults.overallPassfalse → verdict FAIL, exit code non-zero), since you opted in and the SPEC says they must pass. Skipped suites (e.g. no.xcodeproj) are shown but don't count. The summary gets· tests x/y pass.platforms[].testsandmeta.testsinreport.json; a "Test suites" chip in the gate strip, a "Test suites" section (command, exit, duration, the runner's summary line, output tail on failure),tests: onin the header, andNATIVEAPPTEMPLATE_TESTS=1in the reproduce command. Trace:dispatch.logper-platform line, output tail in<platform>.logon failure.runStepnow keeps only the last ~1 MB of output (xcodebuild testprints a lot).docs/validation-report.md,docs/OUTPUT-CHECKLIST.md§3, generate-app skill (also mentions Run the generated apps' linters (with autocorrect) after the rename #149's formatter results).Not done / choices to check
Tests
bin/rails/gradlew/xcodebuild: the exact commands and args (includingNATIVEAPPTEMPLATE_IOS_DESTINATION), db:test:prepare before the suite and a failing prepare stopping it, summary extraction, skipped when the project files are missing. Flag parsing.applyTestResultsgating + summary, and the report section, gate chip and reproduce prefix (absent when off).runStepoutput cap.runTestSuite("android", …)on a copy of the paid Android substrate → pass,BUILD SUCCESSFUL in 36s. I didn't run the real Rails suite (on an un-renamed copy,db:test:preparewould hit the substrate developer's ownnativeapptemplateapi_testDB) or the real iOS suite (needs the simulator, takes minutes).npm run ci: 170/170 pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01UZJxUoubntzu7Ec7DPVfAr