Repository navigation
feat(skill-serving): add configurable output verbosity/strictness profiles (#215) - #471
Conversation
…files (#215) Add SUMO_QA_OUTPUT_PROFILE=concise|default|strict, a serve-time overlay on the single skill-serving path (src/sumo_qa/skill_prompts.py). `default` serves each SKILL.md body byte-for-byte (backwards compatible); `concise` and `strict` prepend a small, bounded overlay that reshapes host output. No SKILL.md is edited and the sumo_qa_load_* catalogue payloads are untouched, so the canonical skill content stays readable and host-neutral, and strict mode cannot bloat payloads. The overlay always restates the never-optional floor (Iron Law/HARD-GATE, evidence for claims, confirmation before writes or installs, mandatory test and safety gates), so no profile can downgrade a gate on high-risk work. An unrecognised value falls back predictably to `default`. Covered by unit tests in tests/test_skill_prompts.py: default byte-for-byte, concise/strict overlays, env-var selection, invalid fallback, over-cap pointer preservation, and a bounded overlay token budget. Docs updated: CONFIGURATION.md (new env var + profiles section), ARCHITECTURE.md, TOOLS.md.
The over-cap pointer now drops the overlay when overlay + pointer would itself exceed the token cap, so the degraded response can never recreate the over-cap failure the pointer exists to prevent. The server-level default-profile parity test asserts byte-for-byte equality through the real registration path. Docs state the single accurate serving contract: the overlay applies to the skill-tool surface only; the progressive loader and resources serve the canonical body with stable hashes.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de5bfde37f
ℹ️ 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".
…tput profiles (#215) The zero-argument skill tools now prepend the #215 output-profile overlay under concise/strict, so the live MCP tool/resource descriptions that state mode="full" (and the sumoqa://.../full resource) are byte-for-byte identical to the zero-argument skill tool were true only under the default profile. Qualify them with the same parity caveat already added to the markdown docs: the loader and resources always serve the canonical body, the skill tool overlays only under a non-default profile, so content_hash stays stable. Addresses codex P2 (loader-description parity) on PR #471.
Batch finish-pass proof (2026-07-13)Per-file review (finish-phase step 6): SAFE across all 9 changed files (per-file, full post-change content vs base); functional logic confined to Codex adversarial pass: SKIPPED at the merge boundary; the Codex CLI/model configuration is unavailable in this session. Per batch policy the gate completed on the per-file review plus behavioral verification below. Historical codex coverage: round 1 (4 findings, fixed Behavioral verification (step 4.7, literal, all through the REAL dispatch
AC ledger: all mechanical ACs on #215 verified (three profiles defined/documented, default byte-compatible, invalid fallback, low-ceremony contract, mandatory gates preserved, strict structure, real registration path, oversize-pointer behavior, parity limits documented). The one open AC ("small-change scenarios produce shorter output in concise mode") is host-LLM-behavioral: the mechanism is delivered and pinned, but the outcome is not unit-demonstrable; the issue author left that box unchecked and the PR body documents it as the epic-#211 residual. Left unticked; the merge decision owner accepts or discharges it (a compare-mcp-versions A/B is the discharge path). Integration check (step 5.5): all 13 batch branches stacked on main v0.51.3: full suite green at the integrated tip (100% coverage over 7823 statements). The known #471 x #476 CI: 33/33 green at head (stale-green vs pre-#492 main; the integrated-tip suite above proves the branch against current main). No open threads. |
🤖 I have created a release *beep* *boop* --- ## [0.52.0](v0.51.3...v0.52.0) (2026-07-13) ### Features * **analysis:** add semantic code analysis adapters for QA recommendations ([#212](#212)) ([#490](#490)) ([24b3abc](24b3abc)) * **conformance:** add cross-model conformance checks for QA routing and outputs ([#214](#214)) ([#476](#476)) ([895cde1](895cde1)) * **gate-evidence:** add evidence-backed gate reporting for QA workflow claims ([#213](#213)) ([#486](#486)) ([05a676d](05a676d)) * **repo-map:** add Java import-edge resolver ([#357](#357)) ([#469](#469)) ([9583754](9583754)) * **repo-map:** add TypeScript/JavaScript import resolver ([#355](#355)) ([#481](#481)) ([568eb38](568eb38)) * **repo-map:** rank affected nodes by connecting-edge confidence in diff-impact ([#363](#363)) ([#475](#475)) ([9e6e426](9e6e426)) * **skill-serving:** add configurable output verbosity/strictness profiles ([#215](#215)) ([#471](#471)) ([577527e](577527e)) --- 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>
…esult (#556) ## What Reverts commit `577527e` (PR #471, issue #215): the `SUMO_QA_OUTPUT_PROFILE` output-profile feature. This is a documented **negative result**, not a bug fix. The feature is removed entirely: the `concise`/`strict` serve-time overlays, the `SUMO_QA_OUTPUT_PROFILE` env var, `_CONCISE_OVERLAY` / `_STRICT_OVERLAY` / `_NEVER_OPTIONAL` / `_resolve_output_profile` / `_profile_overlay`, the profile test suite, and the profile documentation across `CONFIGURATION.md`, `TOOLS.md`, `SKILLS.md`, `ARCHITECTURE.md`. Skill serving returns to the pre-#215 behavior: each `SKILL.md` body served byte-for-byte. ## Why The output profiles were meant to let a user tune how much output they get, so a small change would not bury them in a full QA audit. Measurement under the #528 investigation showed a serve-time prompt overlay **cannot reliably do that**: - On a **strong model**, given a tightened reply contract and grounded input, the model still produced a full structured QA plan. The task-completion drive overrides a prepended "be brief". - On a **weak model**, the instruction was ignored amid ~10x run-to-run variance; the aggregate showed no reliable reduction (and a conceptual Q&A came out longer). A serve-time overlay is a prepended instruction; it loses the tug-of-war with the skill body and the model's drive to complete the task. Rather than keep a knob that does not do its job, the feature is removed. If reply length must be controlled, the effective levers are host-side (the host's own output settings) or fewer, more structured turns, not a served overlay. ## What is kept (deliberately, verified independent of profiles) - **#393 over-cap progressive-loading pointer.** Load-bearing without profiles: `sumo-qa-reviewing-before-merge` is ~18,141 tokens, over the 12,000 per-response cap, so its tool call would fail opaquely without the pointer that redirects the host to load it in slices. - **#476 conformance capture-wrapping.** `maybe_capture` records every skill-tool call for a `SUMO_QA_DEBUG_DIR` conformance capture (#214); no profile logic touches it. - The progressive-loading loader (`sumo_qa_load_skill_context`, `sumoqa://` resources) stays as the fallback the #393 pointer redirects to. ## Docs The single-commit revert cannot reach references added by later PRs, so one was fixed by hand: the epic #211 "verbosity fatigue" control row in `RELIABILITY-HARDENING.md` (added by #502) is rewritten from "mitigated by profiles" to an honest negative result (control tried, measured, reverted; residual: verbosity left to the host). ## Regression - `ruff check` + `mypy` clean (74 source files). - Full suite green, **100% coverage** (`skill_prompts.py` 106 -> 75 statements). CI matrix green on the final head `f3c6386`; scoped mutation gate green. ## Review Codex (bot) raised a P2 on the byte-for-byte serving contract: the reverted body-match test used a weak `in` (contains) assertion that would accept a reintroduced overlay wrapper. Fixed in `f3c6386` - restored exact equality (`bodies[tool_name] == expected_text`) and added `test_output_profile_env_is_inert_after_revert`, which asserts `SUMO_QA_OUTPUT_PROFILE` (concise/strict/lean/nonsense) leaves the served body byte-identical, guarding against a silent reintroduction. Thread resolved. ## Supersedes / closes Closes #528 (the re-scope investigation, concluded as this negative result) and #536 (cost follow-up on the wrong framing). Supersedes PR #535 (the concise re-scope), now closed.
Closes #215.
What
SUMO_QA_OUTPUT_PROFILE=concise|default|stricttunes how much ceremony wraps a served skill body, as a serve-time overlay on the single skill-serving path (src/sumo_qa/skill_prompts.py). NoSKILL.mdis edited;defaultserves every body byte-for-byte (backwards compatible);concise/strictprepend a small bounded overlay that reshapes host output while restating the never-optional floor (Iron Law, HARD-GATE, evidence for claims, confirmation before writes/installs, mandatory gates). The profile resolves fresh on each call (env var, explicit override for tests), an unrecognised value falls back predictably todefault, and the overlay rides the #393 oversize pointer only when overlay + pointer itself fits the cap (otherwise the bare pointer is served, never recreating the over-cap response it exists to prevent).The overlay applies to the skill-tool surface only:
sumo_qa_load_skill_contextand thesumoqa://resources always serve the canonical body, keepingcontent_hashchange-detection stable across profiles. The markdown docs (CONFIGURATION.md,ARCHITECTURE.md,TOOLS.md,SKILLS.md) and the live MCP loader/resource descriptions (server.py,skill_manifest.py,skill_resources.py) all state that single contract.Evidence
skill_prompts.py100%).skills/*/SKILL.mdor promptfoo YAML changed).cb5aa2d. Round 2 clean except one doc parity line, fixed inde5bfde. The final codex P2 (live MCP loader/resource descriptions claiming byte-for-byte parity, true only underdefault) was fixed infa383b1(docstrings/descriptions only). That review thread is resolved.using_sumo_qarouter output byte-identical to main. See the proof comment.Residual limit (documented)
SKILL.mdfrom disk, not the MCP serve path). A live A/B (compare-mcp-versions) is the only thing that could demonstrate it. This is epic [Epic]: Harden QA reliability beyond prompt-only controls #211 documented-limits territory; the issue author left that AC box unchecked.docs/qa/reliability-hardening.mdis not PR-deliverable:docs/qa/is gitignored on main. Where the epic control matrix lives is an epic-level decision at [Epic]: Harden QA reliability beyond prompt-only controls #211 close-out.