Skip to content

docs: index the runnable labs in the repository README - #51

Merged
hellices merged 2 commits into
mainfrom
docs/root-readme-lab-index
Aug 15, 2026
Merged

hellices merged 2 commits into
mainfrom
docs/root-readme-lab-index

Conversation

@hellices

Copy link
Copy Markdown
Owner

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

  • root README gains a 🧪 실습 랩 section listing labs that ship their own azure.yaml, with the two facts a reader needs before starting: time and cost
  • the section states what qualifies as a lab, so the next one is added to the same table
  • test_repo_readme.py keeps the list honest

Why 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 passed
  • confirmed the tests fail for the cases they exist to catch: a lab with azure.yaml missing from the table, and a link whose target does not exist

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 root README.md with 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.py contract 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() so REPO_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.

Comment thread monitor/sre-agent-event-lab/scripts/tests/test_repo_readme.py
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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, (

@hellices
hellices merged commit 61ffde1 into main Aug 15, 2026
1 check passed
Sign up for free to 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.

2 participants