Repository navigation
test(quality): check known cells against live issue state - #4727
Merged
Merged
Conversation
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 22, 2026 09:46
Daniel Meppiel (danielmeppiel)
force-pushed
the
w2-known-cells-live
branch
from
November 22, 2026 10:30
e057b01 to
9197395
Compare
6 of 10 tasks
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 22, 2026
Takes main's shared Known constants in test_ownership_siblings. Converts test_user_scope's #4744 known to a Known, since credits() now carries Known values (#4727). Refreshes known_cell_issue_states.json. Co-authored-by: Copilot App <[email protected]>
python -m tests.quality.known_cell_issues --check-live reads the state of every issue a strict known cell cites in one batched GraphQL request and fails naming each cell whose issue is no longer open, with the remedy. The lint chain runs it on every pull request and in the merge-train guard, so a fix that closes an issue cannot leave a stale strict cell behind. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
force-pushed
the
w2-known-cells-live
branch
from
November 22, 2026 22:14
9197395 to
79d582c
Compare
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 22, 2026
The known-cell guard (#4727, landed with #4769) reads each strict known cell's tracking from a literal or a module constant. The #3703 G1 bin cells and the #4744 target-change bin cell passed it through a loop variable or an attribute, so the guard saw an empty cite. Both issues are open and both cells still fail as tracked, so they keep their trackers, now named by module constants. known_cell_issue_states refreshed. Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Missing issue and pull-request read permissions prevent the live gate from checking cells, while error handling also misclassifies missing issues and transport failures.
3 open issues
What changed in this PR
Adds live GitHub issue-state validation to the known-cell quality gate introduced in #4584, supporting #4565 by detecting stale known failures without waiting for snapshot regeneration.
Changes:
- Adds
--check-livewith batched GraphQL lookups and per-cell diagnostics. - Runs the live check through the shared lint chain for CI and merge trains.
- Adds stubbed tests for open, closed, missing, and unreadable issue states.
| File | Description |
|---|---|
tests/quality/test_known_cells_cite_open_issues.py |
Tests live-check outcomes using stubbed transport. |
tests/quality/known_cell_issues.py |
Implements live queries, state classification, diagnostics, and command dispatch. |
.github/actions/lint-chain/action.yml |
Adds the authenticated live check to the shared lint chain. |
Review effort: Balanced
- live known-cell gate: issues: read (and pull-requests: read) for the lint job, the train guard and both tier1 callers; topology contracts pin it. - decode gh's reply before its exit status: a per-issue NOT_FOUND is MISSING (exit 1); any other GraphQL error, a missing gh or unreadable output is exit 2. Subprocess-stub regressions cover each shape. Co-authored-by: Copilot App <[email protected]>
Collaborator
Author
|
Follow-up: #5072 moves this live check out of PR Lint (to train/main pushes plus a scheduled run, fail-closed there) so a GraphQL outage or one closed tracking issue cannot red every open PR. PR Lint keeps the offline snapshot gate. |
Merged
5 of 14 tasks
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 23, 2026
Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 23, 2026
…le corpus Regenerated against main (#4877, #4727, #5071); the #4981 named removals match the 123 bin cells the filter demotes (two new project gate-matrix cells: lock and mcp-install under a denied dependency). Co-authored-by: Copilot App <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
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.


Description
A strict known cell stays a known failure only while its tracking issue is open. The existing gate (
tests/quality/test_known_cells_cite_open_issues.py, from #4584) checks an offline snapshot,known_cell_issue_states.json. That snapshot changes only when someone runs--write, so an issue that closes on GitHub never trips the gate. A train then goes red later, when the fixed cell starts passing. That happened three times on 2026-11-22 (#4685, #4697, #4638).This PR adds a live mode:
known_cells()andcited_issues()from test(lifecycle): re-ground 21 stale known cells; sign and gate every known cell #4584, with no second discovery.gh api graphql;GH_TOKENin CI).[x] source:tests/lifecycle/scenarios/test_failure_phase.py:62 cites #4594 (CLOSED): rerun the cell; flip it to required if it now passes (or re-key it to an open issue), then run 'python -m tests.quality.known_cell_issues --write'.NOT_FOUND, data still returned) is reported asMISSING. Any other GraphQL error (authorization, rate limit), a missingghor unreadable output exits 2 withcould not read issue state..github/actions/lint-chain, the single owner of the lint chain, so both ci.yml's Lint job and the merge-train guard run it. It takes about 13 s locally. Both jobs, and the tier1 callers of ci.yml, grantissues: readandpull-requests: readfor the lookup;test_ci_topology.pypins it.Run against current main (live): all 19 known cells cite 6 open issues, so the gate is green at merge.
Issue and approved scope
Issue: Refs #4565
Human scope-approval comment: #4564 (comment) (Q&L lifecycle-corpus scope; regent ruling 2026-11-22 10:17 to add a live known-cell gate)
Does this PR complete the issue, or what remains? No. It adds one guard to the #4565 burn-down.
Type of change
Testing
Tested locally
All existing tests pass
Added tests for new functionality (if applicable)
pytest tests/quality/test_known_cells_cite_open_issues.py -k check_live: 4 passed. The tests stub the transport:pytest tests/quality/test_ci_topology.py -k "lint_chain or merge_train or lint": 26 passed.python -m tests.quality.known_cell_issues --check-liveon this branch: exit 1. It flags [BUG] A failed install still keeps the deployed files of the failed attempt (lockfile or MCP config write) #4594, as described above.ruff check/ruff format --check(0.15.12): clean.Changelog
changelog.d/<pr>.<section>.md, holdingone line: user-visible effect first, 25 words or fewer, ending with
(#PR); breaking changes only under upgrade notes; no Highlights; nonew lines under
## [Unreleased]. Seechangelog.d/README.mdand.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.