Repository navigation
docs: index the runnable labs in the repository README - #51
Merged
Merged
Conversation
A lab that deploys real Azure resources is hard to find from the root README. List the labs that ship their own azure.yaml, with the cost and time a reader needs before starting, and keep the list honest with tests that fail when a lab is missing, duplicated, or linked to a path that does not exist. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes runnable labs discoverable from the repository root README by adding a dedicated lab index section, and introduces contract tests to ensure the index stays accurate as more labs are added.
Changes:
- Add a new
## 🧪 실습 랩section in the rootREADME.mdwith a table that links to runnable labs and captures expected time/cost signals. - Define what qualifies as a “runnable lab” (presence of
azure.yaml) and add guidance for keeping the index updated. - Add
test_repo_readme.pycontract tests to enforce: every runnable lab is listed once, links resolve, and key columns are filled.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| README.md | Adds a root-level index section for runnable labs, including time/cost and a link to the lab README. |
| monitor/sre-agent-event-lab/scripts/tests/test_repo_readme.py | Adds contract tests that validate the root README lab index stays complete, unique, and navigable. |
Suppressed comments (1)
monitor/sre-agent-event-lab/scripts/tests/test_repo_readme.py:37
- Consider caching
runnable_labs()soREPO_ROOT.rglob("azure.yaml")only runs once per test session (it is called by several tests in this file).
def runnable_labs():
"""Every directory an operator can provision with `azd up`."""
labs = []
for azure_yaml in REPO_ROOT.rglob("azure.yaml"):
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Every test in the module needs the same lab list, so cache the walk. Verified the cache does not weaken the guards: an unlisted lab and a broken link still fail. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
monitor/sre-agent-event-lab/scripts/tests/test_repo_readme.py:53
Path.read_text()defaults to the system locale encoding. Since the root README contains non-ASCII text (Korean + emoji), this test can fail on environments where the locale isn’t UTF-8 (e.g., some Windows setups). Specify UTF-8 explicitly so the contract test is deterministic across platforms.
def lab_section():
text = README.read_text()
assert LAB_SECTION_HEADING in text, (
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The SRE Agent lab deploys real Azure resources, but nothing in the root README points to it. As more labs land, each one would be equally invisible.
What changed
🧪 실습 랩section listing labs that ship their ownazure.yaml, with the two facts a reader needs before starting: time and costtest_repo_readme.pykeeps the list honestWhy a table and not a generator
One lab today, a handful later. A table costs one row per lab; a generator costs a metadata format and a build step. Revisit if the list outgrows a screen.
Verification
pytest scripts infra -q— 616 passedazure.yamlmissing from the table, and a link whose target does not exist