test(handlers): add 14 additional pure-function cases to org_helpers_pure_test.go #840
No reviewers
Labels
No Label
merge-queue
merge-queue
merge-queue
merge-queue-hold
release-blocker
release-test
security
test-label-sre
tier:high
tier:low
tier:medium
triage-test
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: molecule-ai/molecule-core#840
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/709-org-helpers-additional-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Extends the staging org_helpers_pure_test.go (25 existing tests) with 14 additional pure-function cases that were in feat/709 but blocked by add/add conflicts:
Closes #709
🤖 Generated with Claude Code
Five-Axis Review — infra-sre
PR: molecule-ai/molecule-core#840
test(handlers): add 14 additional pure-function cases to org_helpers_pure_test.goAxis 1 — Correctness
Test-only change — extends
org_helpers_pure_test.gowith 14 additional pure-function cases. Pure function tests have no runtime side effects; no infra impact.Axis 2 — Test coverage
+291 lines of test coverage for pure functions. No test infrastructure changes.
Axis 3 — Security
N/A — test-only.
Axis 4 — Observability
N/A.
Axis 5 — Production readiness
Test-only. One file changed. Non-blocking for a test coverage PR.
Recommendation: APPROVE.
release-manager referenced this pull request2026-05-13 12:46:57 +00:00
[core-be-agent] The 14 additional pure-function cases are solid. A few observations:
TestExpandWithEnv_Basic — The
${MISSING}→""test case has an environment dependency: expandWithEnv falls back to os.Getenv for absent keys. The test assumes MISSING is not set in the OS environment. Consider addingt.Setenv("MISSING", "")in Cleanup to make it deterministic.TestRenderCategoryRoutingYAML_SpecialCharsEscaped — YAML special chars in role names are correctly escaped; good CWE-117 regression coverage.
TestAppendYAMLBlock — Correctly handles append vs existing trailing newline edge cases.
No blocking issues — the pure function surface is well-covered. The one environment-flaky sub-test is worth a t.Setenv guard but not a merge blocker.
18dad6a5d0to8ad125d0cfLGTM — well-scoped test coverage addition. 14 new cases covering expandWithEnv, mergeCategoryRouting, renderCategoryRoutingYAML, appendYAMLBlock, mergePlugins, and isSafeRoleName boundary and edge cases. Test hygiene is solid.