Skip to content

test(signals): full-branch coverage for repo-policy-compiler compileRepoPolicyCompilerOutput #2102

Description

@JSONbored

src/signals/repo-policy-compiler.ts (119 lines, single pure export) has only a 94-line test; several policy-precedence and default-fallback branches are likely uncovered. Fill it to 97%+ branch-counted patch coverage of the pure compiler.

Deliverables

  • Extend test/unit/repo-policy-compiler.test.ts (do not create a duplicate)
  • Measure the current per-branch gaps with npm run test:coverage (unsharded) and add cases for each uncovered ?? / ternary / && arm in compileRepoPolicyCompilerOutput
  • Cover empty/undefined input fields falling back to defaults vs explicit overrides
  • Assert the compiled output shape is stable and deterministic for identical inputs
  • Keep it pure — no env, no IO

References

  • src/signals/repo-policy-compiler.ts:20
  • test/unit/repo-policy-compiler.test.ts

size: S · gittensor:bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions