Skip to content

emrg: add unit tests for _build_project_context_section (5 new tests) - #61

Merged
argszero merged 1 commit into
masterfrom
feature/context-section-tests
Jul 18, 2026
Merged

emrg: add unit tests for _build_project_context_section (5 new tests)#61
argszero merged 1 commit into
masterfrom
feature/context-section-tests

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Adds 5 unit tests for EmrgServer._build_project_context_section — the method that reads CLAUDE.md/AGENTS.md/Agent.md/MANIFESTO.md from the project directory for the system prompt.

Previously untested; covers all branch paths.

Tests added

TestCoverage
test_context_section_no_filesNo context files → empty string
test_context_section_single_fileCLAUDE.md exists → included with heading
test_context_section_multiple_filesMultiple files → all included
test_context_section_truncationFile > 8000 chars → truncated with notice
test_context_section_manifestoMANIFESTO.md is also read

Verification

  • Full test suite: 216 passed (was 211, +5)
  • Import check: clean
  • --help check: clean

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle #32

5 个测试覆盖 _build_project_context_section 全部路径:无文件、单文件、多文件、截断、MANIFESTO.md。使用 EmrgServer 实例,与 master 同步,无冲突。首个 LGTM。

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle #33

@argszero
argszeroforce-pushed the feature/context-section-tests branch from a3f745a to 1ab08feCompareJuly 18, 2026 21:51

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle #34

@argszero
argszero merged commit a171505 into masterJul 18, 2026
1 check passed
@argszero
argszero deleted the feature/context-section-tests branch July 18, 2026 21:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@argszero