fix: agentkit test hygiene — dead branch, misleading name, fragmented drift detectio

Open
#70 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
go
Domain
testing

Research direction

Start with internal/agentkit/agentkit_test.go and read TestForgeGlobal_StructuralHardening, TestSkillFiles_DriftDetection, and TestForgeCoordinationSkill_StructuralHardening; run the relevant Go tests. Done means the TTL regression is detected, drift coverage and test naming match their scope, and a read failure does not prevent reporting other failures.

Written by the indexing model from the issue text.

Description

Follow-up from PR #59 review. Four non-blocking test quality findings in internal/agentkit/agentkit_test.go:

F1/F10 — Dead negative test in TestForgeGlobal_StructuralHardening

Assertion (6) checks for a line starting with "3." that also contains "ttl_seconds" and "auto-release". The current step 3 is "3. FINALLY, coordinator can emergency release..." which doesn't contain "ttl_seconds", so the branch can never fire. The regression it guards against (standalone TTL step reintroduced) would not be caught.

Suggested fix: match any line containing both "ttl_seconds" and "auto-release" that is NOT part of the comms_reserve call, regardless of step number.

F4 — TestSkillFiles_DriftDetection name implies generic scope

The name says "SkillFiles" but the implementation covers only always-on-guidance and forge-global (2 of 7 skills). Either scope the name (TestHardenedSkillFiles_DriftDetection) or extend to all 7 skills.

F2 — Fragmented drift detection

Drift detection is split across two tests covering disjoint subsets: TestSkillFiles_DriftDetection (2 skills) and TestForgeCoordinationSkill_StructuralHardening assertion (5) (1 skill). Four skills have no drift detection. Consider consolidating into a single parameterized test covering all 7.

F3 — t.Fatalf in loop masks failures

TestSkillFiles_DriftDetection uses t.Fatalf for ReadFile errors inside the skill loop. If both skills fail to read, only the first is reported. Use t.Errorf + continue instead.

Dominant language
Go
Stars
0
Forks
9
Avg merge
1d 14h
Merged PRs (30d)
18

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from unbound-force/replicator

All issues in unbound-force/replicator

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.