Skip to content

fix(docker): add --self-test startup check to fail image build on unloadable base - #447

Merged
dnyw4l3n13 merged 4 commits into
mainfrom
fix/445-docker-self-test
Nov 13, 2026
Merged

dnyw4l3n13 merged 4 commits into
mainfrom
fix/445-docker-self-test

Conversation

@prpixie

@prpixie prpixie commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a --self-test mode to BuildBot (Program/SelfTest/ServerStartup) and a Dockerfile RUN ["/usr/src/app/BuildBot", "--self-test"] step so an image whose runtime cannot load the application fails at build time rather than at start-up. Includes tests (100% line coverage) and updated COVERAGE.md.

Closes #445

@prpixie prpixie added the auto-pr Pull request created automatically label Nov 12, 2026
@credfeto

credfeto commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Roslyn analyzer findings

Source Rule Level File Line Suppressed Message
DotNet CA2000 error src/BuildBot/Helpers/ServerStartup.cs 106 yes Call System.IDisposable.Dispose on object created by 'CreateLogger()' before all references to it are out of scope

@dnyw4l3n13 dnyw4l3n13 added AI-Work Work for an AI Agent High High Priority Bug Generic bug fix labels Nov 12, 2026
Add a --self-test switch to BuildBot that starts the server and checks it responds, and run it as a RUN step in the Dockerfile so a broken image fails at build time.

Refs #445
@dnyw4l3n13

Copy link
Copy Markdown
Collaborator

Development: implemented --self-test (Program/SelfTest/ServerStartup), Dockerfile RUN ["/usr/src/app/BuildBot", "--self-test"] step and tests in aaa2ee3. Local build and 439 tests pass. Not yet done: building the image against an unloadable base to prove the build fails at that step. Waiting on CI; next cycle continues.

@dnyw4l3n13

Copy link
Copy Markdown
Collaborator

Simplify clean - advancing to code review

@dnyw4l3n13

Copy link
Copy Markdown
Collaborator

Code review clean - advancing to security review

@dnyw4l3n13

Copy link
Copy Markdown
Collaborator

Code review clean - advancing to security review (board moved by the orchestrator: the session reported no findings but did not move it)

@dnyw4l3n13

Copy link
Copy Markdown
Collaborator

Security review clean, advancing to coverage check

@dnyw4l3n13

Copy link
Copy Markdown
Collaborator

.NET 94.4% < main 100.0% - returning to Development

Uncovered: BuildBot 118/190 lines (62.1%); all other projects 100%. Needs tests for the new --self-test code in Program.cs/SelfTest.cs/ServerStartup.cs.

Add tests for the self-test startup path: application config locator, server startup, program entry, and a shared test config folder helper. Move self-test startup logic out of SelfTestTests into ServerStartup and ApplicationConfigLocator.
@dnyw4l3n13

Copy link
Copy Markdown
Collaborator

Development: Fixed in 6d12275: added tests covering the --self-test startup code (BuildBot line coverage 100%, 450 tests pass) to clear the coverage ratchet. Waiting on CI; next cycle continues.

@dnyw4l3n13

Copy link
Copy Markdown
Collaborator

Simplify clean - advancing to code review

@dnyw4l3n13

Copy link
Copy Markdown
Collaborator

Code review clean - advancing to security review

@dnyw4l3n13

Copy link
Copy Markdown
Collaborator

Security review clean, advancing to coverage check

@dnyw4l3n13

Copy link
Copy Markdown
Collaborator

Coverage ratchet passed - advancing to Human Review (.NET 100.0% >= main 100.0%; COVERAGE.md updated in 1c85102)

@dnyw4l3n13 dnyw4l3n13 changed the title docs(changelog): placeholder for self-test (#445) fix(docker): add --self-test startup check to fail image build on unloadable base Nov 13, 2026
@dnyw4l3n13
dnyw4l3n13 marked this pull request as ready for review November 13, 2026 00:34
@dnyw4l3n13
dnyw4l3n13 requested a review from a team as a code owner November 13, 2026 00:34
@dnyw4l3n13

Copy link
Copy Markdown
Collaborator

AI Review Loop: reviewed 1c85102

@dnyw4l3n13
dnyw4l3n13 enabled auto-merge November 13, 2026 00:34
@credfeto

Copy link
Copy Markdown
Member

Super-linter summary

Language Validation result
DOCKERFILE_HADOLINT Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@dnyw4l3n13
dnyw4l3n13 merged commit 0d948b7 into main Nov 13, 2026
57 of 60 checks passed
@dnyw4l3n13
dnyw4l3n13 deleted the fix/445-docker-self-test branch November 13, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Work Work for an AI Agent auto-pr Pull request created automatically Bug Generic bug fix High High Priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(docker): add a build-time --self-test so a binary that cannot start fails the build

3 participants