add github actions test workflow + branch protection prep (PR-3 fast loop)#102
Merged
Conversation
… loop) implements PR-3 from plans/PLAN-TEST-SUITE-FAST-LOOP.md. - .github/workflows/test.yml: pytest tests -v on pull_request and on push to master; python 3.11; pip install -r requirements.txt + pip install -e . (registers the java-codebase-rag cli entry point for shutil.which checks in tests/test_java_codebase_rag_cli.py); JAVA_CODEBASE_RAG_RUN_HEAVY=0. - workflow + job both named "test" so the check-context string is deterministic (verify with `gh pr checks` before applying branch protection per plan resolved-decisions table). - tests/README.md: tighten the "Merge gate (mechanical)" paragraph to point at the now-real workflow file; drop the "until that lands" hedge; document `enforce_admins: false` break-glass policy. tier tables, consumer matrix, and iteration-subset paragraph untouched (PR-1 / PR-2 own those). note: PR-1 (#100) and PR-2 (#101) merged before PR-3, contrary to the plan's stated PR-3 → PR-1 → PR-2 order. branch protection still requires the dummy-failure validation step before the gh api call that locks master. Co-authored-by: Cursor <cursoragent@cursor.com>
verified with `gh pr checks 102` after the first workflow run on this branch — github collapses the context when workflow name and job name match. update tests/README.md merge-gate paragraph to use the verbatim string so the gh-api branch-protection call in the PR body works. Co-authored-by: Cursor <cursoragent@cursor.com>
whole effort landed: PR-1 (#100), PR-2 (#101), PR-3 (#102). per .cursor/rules/agent-workflow.mdc, move propose / plan into the completed/ trees once the *whole* effort is landed — not after each PR. - propose/TEST-SUITE-FAST-LOOP-PROPOSE.md → propose/completed/ (status header flipped to "locked — implemented across PR-1..PR-3") - plans/PLAN-TEST-SUITE-FAST-LOOP.md → plans/completed/ (status flipped to "completed"; tracking footer notes merged PRs and the PR-1 → PR-2 → PR-3 landing-order divergence) - update inbound links: - tests/README.md iteration-subset paragraph: point at the completed/ paths; drop the now-stale "once the merge gate from PR-3 exists" wording since it now exists. - .cursor/skills/plan-prompts/SKILL.md: bump the two cross-refs in the "Tests to run (iteration loop) — required subsection". - automation/cursor_propose_only/README.md: swap the autopilot example --proposal arg to TIER2-INCREMENTAL-REBUILD-PROPOSE.md so the copy-pasteable command keeps pointing at an active propose. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Implements PR-3 from
plans/PLAN-TEST-SUITE-FAST-LOOP.md(perpropose/TEST-SUITE-FAST-LOOP-PROPOSE.md§3 C / §8 PR-3)..github/workflows/test.yml(new) — single Ubuntu / Python 3.11 job;pip install -r requirements.txtthenpip install -e .(so thejava-codebase-ragCLI entry point is registered fortests/test_java_codebase_rag_cli.py); runspytest tests -vwithJAVA_CODEBASE_RAG_RUN_HEAVY=0. Workflowname: testand jobname: testare both explicit so the check-context string GitHub renders is deterministic.tests/README.md— tighten the Merge gate (mechanical) paragraph: point at the now-real.github/workflows/test.yml, document the required check onmaster, and recordenforce_admins: falseas the break-glass policy. Tier tables, consumer matrix, and the iteration-subset paragraph are untouched (PR-1 / PR-2 own those).Actual check-context string
gh pr checks 102on the first run reports the context astest(single token — GitHub collapses when workflow name equals job name). The README and the branch-protection recipe below were updated to that verbatim string in the second commit on this PR (Risk #7 in the plan).Landing-order divergence (called out per plan)
The plan specifies PR-3 → PR-1 → PR-2, but PR-1 (#100) and PR-2 (#101) already merged. PR-3 is therefore shipping last. The risk this opened (a small window where PR-1's fixture refactor was not mechanically validated by CI) is closed by this PR going green here.
Scope sentinels (per plan §3 / agent-workflow per-PR contract)
git diff master..HEAD --stat:Out of scope (verified zero hits in diff):
tests/conftest.py,tests/_builders.py, anytests/test_*.py,.cursor/skills/, production code underbuild_ast_graph.py/server.py/kuzu_queries.py/ etc.Manual evidence
.venv/bin/ruff check .→All checks passed!JAVA_CODEBASE_RAG_RUN_HEAVY=0 .venv/bin/python -m pytest tests -q→372 passed, 7 skipped, 2 warnings in 308.90s (0:05:08)(exit 0). The 7 skips are theJAVA_CODEBASE_RAG_RUN_HEAVY-gated and cocoindex-conditional cases documented intests/README.md.Post-open procedural steps (the maintainer runs these; do NOT skip)
Per plan §3 (Tests for PR-3) + Risk #2 + Risk #7. None of these touch git history beyond an optional throwaway branch:
Confirm the check-context string stays
teston the next workflow run (sanity):If it ever differs, re-edit the
tests/README.mdparagraph in this PR before merge so the doc matches the value GitHub will require.Dummy-failure validation (Risk Tier 1 completion plan + proposals (B2a + B4 + B5) #2 — false-green workflow). On a throwaway branch:
Apply branch protection with the verbatim check-context string (Risk Implement PR-A2: SpEL/constant-ref routes and route MCP tools #7):
Definition of done (mirrors plan)
.github/workflows/test.ymlexiststests/README.mdmerge-gate paragraph updated; no other section touchedgh pr checks(test) and reflected in doc + reciperuffclean; localpytest testsgreencontexts: ["test"](procedural — step 3 above)