Skip to content

docs(contributing): define the QA tool preflight and source-tree degraded mode - #745

Merged
sumithr merged 5 commits into
mainfrom
docs/issue-473-qa-tool-preflight
Sep 29, 2026
Merged

sumithr merged 5 commits into
mainfrom
docs/issue-473-qa-tool-preflight

Conversation

@sumithr

@sumithr sumithr commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

A healthy sumo-qa install does not mean the running agent session has the sumo-qa tools attached. Until now, contributor workflows had no defined path for that case, so each batch worker improvised its own fallback. This PR adds one tracked contract:

  • The orchestrator checks its own tool list once, before any claim or dispatch.
  • It chooses mcp or source-tree mode for the whole dispatch and hands every worker the same mode and authority commit.
  • In source-tree mode, work follows a fixed ordered route pinned to that commit. A missing file blocks the run instead of falling back to memory.

Related issue

Closes #473

Changes

  • .claude/README.md: new section "QA tool availability: preflight and source-tree degraded mode".
    • Separates "installed and healthy" from "attached to this session".
    • Preflight outcome table. The preflight invokes using_sumo_qa once. A failed invocation stops the run instead of switching sources.
    • qa_context_mode and authority-commit hand-off. Fix-workers and the orchestrator's review route by the same mode, and a worker handed mcp without the tools escalates.
    • The ordered source-tree route, read via git show <sha>:<path>. The routing payload uses canonical IDs, or n/a exactly where the deciding-approach skill allows it. When the router stops with next_action.skill set to none, the worker skips the routed skill but still records the gap note.
    • Loader-to-file table, with ls-tree for directories and packs as both *.yml and *.yaml.
    • Loader filters apply in source-tree mode, so the degraded catalogue matches the MCP call:
      • Filter terms split on commas, semicolons or whitespace, with backticks and quotes stripped.
      • Filtered standards keep only packs whose applies_to_classifications or classifications metadata names a requested classification.
      • Filtered rules keep matching keys. They fall back to the legacy key through _RULE_CLASSIFICATION_ALIASES in src/sumo_qa/knowledge_loaders.py, held under the requested name.
    • Env overrides and ingested packs are named as out of scope.
    • Rules for non-loader tools, a provenance gap note, and a warning that source-tree content is not evidence about the released package.
  • docs/DEVELOPMENT.md: short section cross-linking the contract.

The local gitignored pipeline changes are not PR deliverables. The work-issue skill, implement-phase and the ready-batch skill run the preflight and pass the mode to workers, and implement-phase step 2 mirrors the filter, alias, n/a and gap-note rules above. They are recorded in the issue comment and the merge-verification comment on #473.

Follow-up commits on this branch:

  • 35cf2e7 and 73893ad make source-tree mode apply the loader classification filters and rule aliases, with the loader's alias naming and filter-term stripping. This resolves the Codex P2 review thread.
  • bf99677 keeps the degraded-provenance gap note when the router stops at none.
  • 2321906 allows the router's n/a values in the source-tree payload.
  • The ls-tree sentence now sits under the loader table.

How it was verified

  • Full suite in the worktree: 4439 collected, 0 failed, 8 skipped or xfailed, coverage 100%.
  • pre-commit run --files .claude/README.md: all hooks passed, including the markdown-link hook. scripts/check_markdown_links.sh: 201 passed.
  • A behaviour ledger covered all 11 acceptance criteria. Each ran on a real clone with haiku headless workers, some with no MCP, some with the branch-build MCP, and some with an MCP server whose tools fail. All 11 rows are met. The ledger found three misses, each fixed on this branch and re-run green:
    • A filtered standards load also pulled in istqb_v1, which the MCP loader drops.
    • A worker that stopped at the router's none stop dropped its gap note.
    • The payload rule forbade the router's legitimate n/a values.
  • Source-tree and MCP workers gave identical routing payloads on the same inputs: a refund bug and an orphaned-tests removal.
  • Existing flow: using_sumo_qa and sumo_qa_load_classifications return byte-identical output on the branch and main builds.
  • Merge-boundary review: a per-file sumo-qa reviewing-before-merge pass over both changed files. It checked every factual claim against the loaders, standards, knowledge and skills, and all 11 acceptance criteria against the branch.
  • Codex adversarial review ran on each fix commit, and the passes on 73893ad and bf99677 came back clean. Codex then hit its usage limit, so the built-in /code-review reviewed 2321906 and found it clean. The one review thread on this PR is resolved.
  • Evals: not applicable, since no skill or catalogue content changed.

Checklist

  • PR title follows Conventional Commits
  • Tests pass locally with pytest, and lint checks on the changed files are green. mypy was not run: no Python changed.
  • Added or updated tests covering the change. None: no existing test guards .claude/README.md, and the issue rules out a prose snapshot.
  • Updated the relevant docs in this same PR
  • No breaking changes

…aded mode

Contributor workflows that route through sumo-qa now have one tracked
contract for a session without the sumo-qa tools attached: the
orchestrator checks its own tool list once before dispatch, picks mcp or
source-tree mode for the whole batch, and hands every worker the same
mode and authority commit. The degraded route reads only tracked
skills/knowledge/standards files at that commit, keeps the routing
payload and the routed skill's gates, blocks on a missing file instead
of falling back to memory, and records its provenance as a gap note.

The docs also separate "the server is installed and healthy" from "the
tools are attached to this session".

Closes #473

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 09134dea6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .claude/README.md Resolved
@sumithr
sumithr merged commit 2eb9de0 into main Sep 29, 2026
33 checks passed
@sumithr
sumithr deleted the docs/issue-473-qa-tool-preflight branch September 29, 2026 21:44
sumithr added a commit that referenced this pull request Sep 30, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.67.0](v0.66.1...v0.67.0)
(2026-09-30)


### Features

* **review:** probe mirrored dependency constraints across manifests,
hooks, CI, and images
([#493](#493))
([#772](#772))
([dd04c23](dd04c23))


### Documentation

* **contributing:** define the QA tool preflight and source-tree
degraded mode ([#745](#745))
([2eb9de0](2eb9de0))


### Miscellaneous Chores

* **pre-commit:** install the pre-push hooks by default and always run
pytest ([#775](#775))
([135cbf6](135cbf6))


### Continuous Integration

* **toolchain:** guard pre-commit hook dependency pins against pyproject
([#714](#714))
([#751](#751))
([121dc0e](121dc0e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: release-please[bot] <release-please[bot]@users.noreply.github.com>
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.

[Task]: preflight QA tool availability and standardize the source-tree fallback

1 participant