Skip to content

test(#2511): strengthen agent-field assertions after ADR-0045 Phase 4#2515

Open
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/2511-review-findings-adr0045
Open

test(#2511): strengthen agent-field assertions after ADR-0045 Phase 4#2515
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/2511-review-findings-adr0045

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Finding 1: In TestNewOrgConfig, change assert.Empty to assert.Nil for cfg.Agents. Since NewOrgConfig no longer sets the Agents field, the value should be nil (Go zero value), not merely empty. This enforces the stronger invariant that matters for YAML omitempty serialization behavior.

Finding 2: In TestConfigRepoLayer_Install_CreatesRepo, add an integration-level assertion that reads back the written config.yaml content and verifies it does not contain an "agents:" key. This confirms the end-to-end behavior that Install() produces an agents-free config file.

Finding 3 (NewOrgConfig options struct) is deferred per the issue as a design improvement, not a blocker.

Note: pre-commit could not run due to shellcheck-py network error in sandbox (exit 3). The post-script runs pre-commit authoritatively on the runner.


Closes #2511

Post-script verification

  • Branch is not main/master (agent/2511-review-findings-adr0045)
  • Secret scan passed (gitleaks — 619c19d688c0aa3c25af0be4fd8b07cbc8099241..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

Finding 1: In TestNewOrgConfig, change assert.Empty to assert.Nil
for cfg.Agents. Since NewOrgConfig no longer sets the Agents field,
the value should be nil (Go zero value), not merely empty. This
enforces the stronger invariant that matters for YAML omitempty
serialization behavior.

Finding 2: In TestConfigRepoLayer_Install_CreatesRepo, add an
integration-level assertion that reads back the written config.yaml
content and verifies it does not contain an "agents:" key. This
confirms the end-to-end behavior that Install() produces an
agents-free config file.

Finding 3 (NewOrgConfig options struct) is deferred per the issue
as a design improvement, not a blocker.

Note: pre-commit could not run due to shellcheck-py network error
in sandbox (exit 3). The post-script runs pre-commit
authoritatively on the runner.

Closes #2511
@github-actions

Copy link
Copy Markdown

E2E tests did not run

E2E tests run automatically for org/repo members and collaborators on pull requests.

For other contributors, a maintainer must add the ok-to-test label after the latest push.

See E2E testing guide for details.

@github-actions

Copy link
Copy Markdown

Site preview

Preview: https://a94eeab9-site.fullsend-ai.workers.dev

Commit: 512f73cbe5de9addb55649f5bd52cc31c21f5808

@fullsend-ai-review

fullsend-ai-review Bot commented Jun 22, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 4:04 PM UTC · Completed 4:13 PM UTC
Commit: 512f73c · View workflow run →

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review

Copy link
Copy Markdown

Looks good to me.

Low

  • [test-adequacy] internal/layers/configrepo_test.go:72 — The assert.NotContains(t, configContent, "agents:") assertion could pass vacuously if configContent is empty (e.g., if FakeClient stores a file entry with zero-length Content). Adding assert.NotEmpty(t, configContent) before the NotContains check would guard against this silent pass-through. In the current test setup the marshal path produces non-empty YAML, so this is a defensive-testing suggestion rather than a current bug.

Labels: Test-only change in the install config-repo layer addressing prior review findings.

// ADR-0045 Phase 4: NewOrgConfig no longer sets the agents field,
// so the written config.yaml must not contain an agents: key.
assert.NotContains(t, configContent, "agents:", "config.yaml should not contain agents: block after ADR-0045 Phase 4")
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] test-adequacy

The assert.NotContains(t, configContent, "agents:") assertion could pass vacuously if configContent is empty. Adding assert.NotEmpty(t, configContent) before the NotContains check would guard against this silent pass-through.

Suggested fix: Add assert.NotEmpty(t, configContent, "config.yaml content should not be empty") before the NotContains assertion.

@fullsend-ai-review fullsend-ai-review Bot added ready-for-merge All reviewers approved — ready to merge component/install CLI install and app setup type/chore Maintenance and housekeeping tasks labels Jun 22, 2026
@ggallen

ggallen commented Jun 22, 2026

Copy link
Copy Markdown
Member

/fs-fix Rebase and address the review issues.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ❌ Failure · Started 4:34 PM UTC · Completed 4:40 PM UTC
Commit: 4e21a60 · View workflow run →

@ggallen

ggallen commented Jun 22, 2026

Copy link
Copy Markdown
Member

/fs-fix Rebase and address the review issues.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ❌ Failure · Started 6:49 PM UTC · Completed 6:52 PM UTC
Commit: 4e21a60 · View workflow run →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/install CLI install and app setup ready-for-merge All reviewers approved — ready to merge type/chore Maintenance and housekeeping tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Address review findings from ADR-0045 Phase 4 PR 2 (#2447)

1 participant