Skip to content

test(kernel): move source-value coverage beside the kernel owner #2147

Description

@thymikee

Parent: #2129

Blocked by: none. Wave 1; this is test-topology cleanup for an already-owned kernel facet.

Scope — exact tracked files

Test:

  • src/utils/source-value.test.ts

There is no production implementation in src/utils for this slice. The implementation under test is already packages/kernel/src/source-value.ts.

Destination and importer edits

Move the test to the source-mirroring package location:

  • packages/kernel/src/source-value.test.ts

Keep its existing import of @agent-device/kernel/source-value; do not create a package test-only export, root test helper, or src/utils compatibility path.

Behavior invariants

Preserve every source-value parser case: boolean and boolean-or-string coercion, non-empty strings, enums and enum flags, integer bounds, environment variable naming, invalid-argument codes/messages, and setValue behavior. This child must not alter the kernel implementation.

Focused validation

Run pnpm vitest run packages/kernel/src/source-value.test.ts and the affected kernel/package boundary checks, then pnpm check:affected --run.

Planted-red proof

No new structural rule is added. Temporarily change a literal expected enum/error result in the moved test and observe the test fail; restore it before the green run. The test must continue to validate the package implementation rather than a newly created local copy.

Dependency order

Wave 1. This child is independent of all production owner moves. The terminal child is blocked by it.

Shrink target

Delete the old utility test and add no production code. The final tracked tree must contain no src/utils/source-value.test.ts.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions