Add lifecycle tests for template repository health issues
- Dominant language
- TypeScript
- Stars
- 269
- Forks
- 176
- Avg merge
- 11h 1m
- Merged PRs (30d)
- 37
Description
## Context
Follow-up from Kristen's approved review of #960: https://github.com/Azure/awesome-azd/pull/960#pullrequestreview-4930441850
The repository health tests cover URL parsing, finding classification, report rendering, and marker-owned issue selection. They do not yet exercise the persistent issue synchronization lifecycle.
## Proposed change
Add tests with a mocked `gh` boundary for these paths:
- create a generated issue when unhealthy findings exist and no managed issue exists
- update an existing managed issue
- reopen a closed managed issue when unhealthy findings return
- close an open managed issue when the catalog becomes healthy
- perform no write when the catalog is healthy and no open managed issue exists
- never edit or close a human-authored issue that lacks the ownership marker
Refactor the command boundary for dependency injection if needed, without changing production behavior.
## Acceptance criteria
- All create, update, reopen, close, and healthy no-op paths have deterministic automated coverage.
- Tests assert the exact intended GitHub operations without making network calls.
- Marker ownership remains required for updates and closure.
Follow-up to #960.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the repository health tests and the command boundary used to synchronize GitHub issues. Run the existing test suite, then add mocked coverage for create, update, reopen, close, healthy no-op, and unmarked human-authored issue paths. Done means deterministic assertions of exact operations without network calls and all tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, typescript
- Domain
- testing, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100