test: CI host-boot smoke gate (S6-002)#99
Merged
Conversation
…(S6-002) Why: the 590-test xUnit suite never boots the Functions host, so a dead host shipped invisibly behind green tests (S5-004r: TypeLoadException + bare-type DI registration). This turns the runbook section 2 steps 4-5 preflight into a standing CI merge gate for every src-touching PR. - tools/ci/host-boot-smoke.sh: starts func start against Azurite, polls /admin/functions (curl --max-time 5, 180s deadline) for the 4 expected timer names (extras warn, never fail silently), scans the captured log for TypeLoadException / language-worker failures / restart loops (scan-log subcommand for isolated testing), kills the process tree on exit. Env-only config, zero secrets, nothing echoed. - ci.yml: host-boot-smoke job (ubuntu, timeout-minutes: 10, Core Tools 4.8.0 + Azurite 3.35.0 pinned per spec D9), gated by the backend filter (extended with tools/ci/** and the workflow itself), wired into all-checks so it gates merges; host log uploaded on failure. Verified locally: bogus expected name → exit 1 with clear message; fixture logs (TypeLoadException, worker-fail, 3x restart) → exit 1; clean real boot on PORT=7188 + throwaway Azurite → exit 0 in 13s. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review fix-now items from the S6-002 judge pass: - ci.yml: cache ~/.npm keyed on the pinned tool versions; raise job timeout to 15 min; upload host log on failure OR cancellation (timeout-minutes kill) with 7-day retention; guard comment that only UseDevelopmentStorage is permitted (log may capture the connection string otherwise). - host-boot-smoke.sh (comments/echo only, gate logic unchanged): EXPECTED_FUNCTIONS source-of-truth comment; Azurite-unreachable message gains local-context guidance; all failure paths print the captured log path; header states exit codes are 0/1 undifferentiated and lists jq as optional. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Adds a CI host-boot smoke gate so a Functions worker that cannot boot can never merge behind green unit tests:
tools/ci/host-boot-smoke.sh— boots Azurite +func startfor src/TradingSystem.Functions, polls/admin/functionsuntil all 4 timer functions (DailyOrchestrator_PreMarket, DailyOrchestrator_EndOfDay, IncomeSleeve_MonthlyReinvest, IncomeSleeve_QuarterlyAudit) register, then scans the captured host log for TypeLoadException, language-worker start failure, and worker-restart loops.scan-logsubcommand exercises the scanner in isolation. Always kills the func process tree on exit. Exit codes: 0 = pass, 1 = any failure (stderr is the diagnostic)..github/workflows/ci.yml— newhost-boot-smokejob (ubuntu-latest, pinned azurite@3.35.0 + azure-functions-core-tools@4.8.0); backend paths-filter extended withtools/ci/**and the workflow file itself;all-checksgate includes the new job.Why
The 590-test xUnit suite never boots the Functions host — S5-004r shipped an AI 3.0/Worker-AI 2.50 TypeLoadException and a missing DI registration invisibly behind green tests. This automates the paper-validation runbook preflight steps 4-5 (worker boots, all 4 timers register) as a standing merge gate for src-touching PRs.
Review fix-now items applied (b7170f3)
failure() || cancelled()withretention-days: 7; guard comment that only UseDevelopmentStorage is permitted in this job (the log would capture a real connection string).[Function]methods in DailyOrchestrator.cs / IncomeSleeveFunction.cs; the unexpected-extras WARN is the drift detector); Azurite-unreachable message gives local-context guidance; every failure path prints the captured log path; header honesty on undifferentiated 0/1 exit codes; jq listed as optional precondition.Test plan
bash -n tools/ci/host-boot-smoke.sh— syntax clean; file is LF-only (.gitattributes pin)failure() || cancelled(), retention-days 7, all-checks needsPORT=7188+ throwaway Azurite on 10210-10212 — host booted, all 4 functions registered, no failure signatures, exit 0; live host (7071) and live Azurite (10000) untouchedscan-logsubcommand against a log seeded with TypeLoadException / worker-restart lines — exit 1 with named signaturesdotnet buildRelease — 0 warnings, 0 errorsdotnet test— 590/590 passed🤖 Generated with Claude Code