This repository was archived by the owner on Jun 27, 2026. It is now read-only.
test: restore structural-guard tests rewritten against current paths#14
Open
toon-backlog-bot[bot] wants to merge 1 commit into
Open
test: restore structural-guard tests rewritten against current paths#14toon-backlog-bot[bot] wants to merge 1 commit into
toon-backlog-bot[bot] wants to merge 1 commit into
Conversation
Restores the four tests removed in #11 (org-wide CI fix), rewritten against the current repo structure rather than the stale paths they referenced before: - connector-version-alignment.test.ts: asserts DEFAULT_CONNECTOR_IMAGE is digest-pinned (ghcr.io/toon-protocol/connector@sha256:<64hex>) and DEFAULT_CONNECTOR_TAG is semver. Guards CONNECTOR_VERSION_DEFAULT in publish-townhouse-images.yml via it.skipIf (workflow doesn't exist yet; guard activates automatically when it is added). - docker/mill-dockerfile.test.ts: originally checked docker/Dockerfile.mill (removed during mill→swap rename). Now verifies mill entry in fixture image-manifest + mill service in HS/direct compose templates. - docker/dvm-dockerfile.test.ts: same pattern for dvm. - __tests__/dev-fixtures.test.ts: verifies all four fixture files exist, image-manifest.json has the correct five-entry structure and valid digests, and cross-file invariants hold (connector tag in manifest matches dev compose; HS compose uses ≥5 digest-pinned images). All 20 new tests pass; 1 is skipped (workflow guard, activates when publish-townhouse-images.yml lands). Pre-existing ActivityTicker failure is unchanged. Closes #10 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ALLiDoizCode
approved these changes
Jun 19, 2026
ALLiDoizCode
left a comment
Contributor
There was a problem hiding this comment.
Review: test: restore structural-guard tests rewritten against current paths
Checked:
Correctness — all assertions verified against current repo state
DEFAULT_CONNECTOR_IMAGE=ghcr.io/toon-protocol/connector@sha256:48d2160e…de4(64 lowercase hex chars) — matches the test regex^ghcr\.io\/toon-protocol\/connector@sha256:[0-9a-f]{64}$✓DEFAULT_CONNECTOR_TAG='3.10.4'— matches the semver regex ✓- All four fixture files exist under
src/__tests__/fixtures/compose-loader/✓ - Fixture
image-manifest.jsonhas exactly the five asserted keys (connector,dvm,mill,town,townhouse-api), all with valid 64-char hex digests ✓ - Cross-fixture invariant: fixture manifest connector tag
3.4.1appears asconnector:3.4.1intownhouse-dev.yml✓ - HS compose has five
@sha256:digest pins (one per service) ✓ it.skipIf(!existsSync(PUBLISH_WORKFLOW_PATH))correctly skips the workflow-alignment check sincepublish-townhouse-images.ymldoesn't exist yet ✓PUBLISH_WORKFLOW_PATHresolves to<repo-root>/.github/workflows/publish-townhouse-images.yml(3 levels up fromsrc/) ✓- File placement in
src/docker/is consistent with existing test files in that directory ✓
Minor non-blocking notes (not requesting changes)
- Repetitive I/O:
image-manifest.jsonis read andJSON.parsed four separate times indev-fixtures.test.tsrather than once in abeforeAll. Negligible in practice but worth tightening on a future pass. - Weak count guard:
HS compose uses digest-pinned images for all five servicescounts/@sha256:…/gmatches ≥ 5 rather than asserting one per named service. A service added without a digest wouldn't be caught as long as another service compensated. Fine for now given the fixture is tightly controlled. - Fixture/constants tag drift: Fixture connector tag (
3.4.1) is significantly behindDEFAULT_CONNECTOR_TAG(3.10.4). No cross-check links the two, so bumpingDEFAULT_CONNECTOR_TAGleaves the fixture silently stale. The design appears intentional (fixture tests structural loading logic;connector-version-alignmenttests production constants), but documenting this split would prevent future confusion. - Slightly misleading comment in
mill-dockerfile.test.ts: States the Dockerfile was "removed during the mill→swap rename" but the current codebase still usesmillthroughout (ACCOUNT_INDEX_MILL,MILL_HEALTH_PORT, etc.). The tests themselves are correct for the current naming.
No blocking issues. The guards correctly protect the image-manifest structure and connector version format, and the skipIf design elegantly future-proofs the workflow-alignment check.
This was referenced Jun 20, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
connector-version-alignment.test.ts: assertsDEFAULT_CONNECTOR_IMAGEis digest-pinned (ghcr.io/toon-protocol/connector@sha256:<64hex>) andDEFAULT_CONNECTOR_TAGis a valid semver. The workflow alignment check (CONNECTOR_VERSION_DEFAULTinpublish-townhouse-images.yml) is guarded byit.skipIf— skips cleanly now, activates automatically when the workflow is added.docker/mill-dockerfile.test.ts: originally checkeddocker/Dockerfile.mill(removed during mill→swap rename). Now verifies themillentry in the fixture image-manifest has the correct name/digest format and that both HS and direct compose templates define a digest-pinnedmillservice.docker/dvm-dockerfile.test.ts: same pattern fordvm.__tests__/dev-fixtures.test.ts: verifies all four fixture files exist,image-manifest.jsonhas the expected five-entry structure with valid sha256 digests, and key cross-fixture invariants hold (connector tag in manifest matches dev compose; HS compose uses ≥5 digest-pinned images).Verification
Result: 20 passed | 1 skipped (workflow guard, activates when
publish-townhouse-images.ymllands)Full suite: 1505 passed | 3 skipped | 1 failed — the single failure is the pre-existing
ActivityTicker.test.tsxUSDC fallback failure noted in the #11 commit ("REAL failure — kept"), not introduced by this PR.Deviation from Agent Assessment plan
Plan step 1 called for reading current
docker/Dockerfile names — there are no Dockerfiles in the current repo (hub uses pre-built registry images). The docker tests were rewritten to verify the equivalent structural invariants via the fixture image-manifest and compose templates instead.Closes #10