Compare commits
1 Commits
fix/662
...
sprint/iss
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a7ee7a5f2 |
51
docs/issue-680-verification.md
Normal file
51
docs/issue-680-verification.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# Issue #680 Verification — Fleet-Ops Genome Already Implemented
|
||||
|
||||
**Date:** 2026-04-14
|
||||
**Verified by:** Sprint auto-implementation (issue #807)
|
||||
**Status:** ✅ Already implemented on `main`
|
||||
|
||||
## Summary
|
||||
|
||||
The fleet-ops genome deliverable requested in issue #680 already exists on `main`.
|
||||
This document records the verification evidence and closes the stale issue.
|
||||
|
||||
## Existing Artifact
|
||||
|
||||
- **Genome document:** `genomes/fleet-ops-GENOME.md`
|
||||
- **Regression test:** `tests/test_fleet_ops_genome.py`
|
||||
|
||||
The genome document contains:
|
||||
- Project overview grounded in a fresh clone of `fleet-ops` at commit `38c4eab`
|
||||
- Mermaid architecture diagram
|
||||
- Structural analysis of Ansible playbooks, Python microservices, cron jobs, and docker-compose sandbox
|
||||
- Key abstractions, API surface, test coverage gaps, security considerations, and deployment notes
|
||||
- Concrete metrics: 97 source files, 12 test files, 29 config files, 16,658 lines
|
||||
- Test results: 158 passed, 1 failed, 2 errors
|
||||
|
||||
## Prior PR Trail (Closed Unmerged)
|
||||
|
||||
The issue remained open because earlier linking PRs were closed without merging:
|
||||
|
||||
- **PR #697** — closed unmerged
|
||||
- **PR #770** — closed unmerged
|
||||
|
||||
Since the artifact landed on `main` through other means, those PRs became stale.
|
||||
|
||||
## Verification Commands
|
||||
|
||||
```bash
|
||||
# Confirm artifact exists
|
||||
ls -la genomes/fleet-ops-GENOME.md
|
||||
ls -la tests/test_fleet_ops_genome.py
|
||||
|
||||
# Run regression tests
|
||||
python3 -m pytest -q tests/test_fleet_ops_genome.py
|
||||
|
||||
# Syntax check
|
||||
python3 -m py_compile tests/test_fleet_ops_genome.py
|
||||
```
|
||||
|
||||
## Conclusion
|
||||
|
||||
No new content is needed. Issue #680 is resolved by the existing implementation.
|
||||
This PR adds the verification doc and a test to lock the evidence trail.
|
||||
@@ -1,6 +1,6 @@
|
||||
# Burn Lane Empty Audit — timmy-home #662
|
||||
|
||||
Generated: 2026-04-17T03:42:50Z
|
||||
Generated: 2026-04-16T01:22:37Z
|
||||
Source issue: `[ops] Burn lane empty — all open issues triaged (2026-04-14)`
|
||||
|
||||
## Source Snapshot
|
||||
@@ -11,9 +11,9 @@ Issue #662 is an operational status note, not a normal feature request. Its body
|
||||
|
||||
- Referenced issues audited: 42
|
||||
- Already closed: 30
|
||||
- Open but likely closure candidates (merged PR found): 1
|
||||
- Open with active PRs: 0
|
||||
- Open / needs manual review: 11
|
||||
- Open but likely closure candidates (merged PR found): 0
|
||||
- Open with active PRs: 12
|
||||
- Open / needs manual review: 0
|
||||
|
||||
## Issue Body Drift
|
||||
|
||||
@@ -21,56 +21,56 @@ The body of #662 is not current truth. It mixes closed issues, open issues, rang
|
||||
|
||||
| Issue | State | Classification | PR Summary |
|
||||
|---|---|---|---|
|
||||
| #579 | closed | already closed | closed PR #644, closed PR #643, closed PR #640, closed PR #635, closed PR #620 |
|
||||
| #648 | open | needs manual review | closed PR #731 |
|
||||
| #579 | closed | already closed | closed PR #644, closed PR #640, closed PR #635, closed PR #620 |
|
||||
| #648 | open | active pr | open PR #731 |
|
||||
| #647 | closed | already closed | issue already closed |
|
||||
| #619 | closed | already closed | issue already closed |
|
||||
| #616 | closed | already closed | issue already closed |
|
||||
| #614 | closed | already closed | issue already closed |
|
||||
| #613 | closed | already closed | issue already closed |
|
||||
| #660 | closed | already closed | issue already closed |
|
||||
| #659 | closed | already closed | closed PR #660 |
|
||||
| #659 | closed | already closed | issue already closed |
|
||||
| #658 | closed | already closed | issue already closed |
|
||||
| #657 | closed | already closed | issue already closed |
|
||||
| #656 | closed | already closed | closed PR #658 |
|
||||
| #655 | closed | already closed | issue already closed |
|
||||
| #654 | closed | already closed | closed PR #661 |
|
||||
| #653 | closed | already closed | closed PR #660, closed PR #655 |
|
||||
| #652 | closed | already closed | closed PR #660, merged PR #657, closed PR #655 |
|
||||
| #651 | closed | already closed | closed PR #655 |
|
||||
| #650 | closed | already closed | closed PR #661, closed PR #660, merged PR #654, closed PR #651 |
|
||||
| #649 | closed | already closed | closed PR #660, merged PR #657, closed PR #651 |
|
||||
| #646 | closed | already closed | closed PR #655, closed PR #651 |
|
||||
| #582 | open | closure candidate | merged PR #641, merged PR #639, merged PR #637, merged PR #631, merged PR #630 |
|
||||
| #653 | closed | already closed | issue already closed |
|
||||
| #652 | closed | already closed | merged PR #657 |
|
||||
| #651 | closed | already closed | issue already closed |
|
||||
| #650 | closed | already closed | merged PR #654 |
|
||||
| #649 | closed | already closed | issue already closed |
|
||||
| #646 | closed | already closed | issue already closed |
|
||||
| #582 | open | active pr | open PR #738 |
|
||||
| #627 | closed | already closed | issue already closed |
|
||||
| #631 | closed | already closed | issue already closed |
|
||||
| #632 | closed | already closed | issue already closed |
|
||||
| #634 | closed | already closed | issue already closed |
|
||||
| #639 | closed | already closed | issue already closed |
|
||||
| #641 | closed | already closed | issue already closed |
|
||||
| #575 | closed | already closed | closed PR #658, merged PR #656 |
|
||||
| #576 | closed | already closed | merged PR #664, closed PR #663, closed PR #660, closed PR #655, merged PR #654, closed PR #651, closed PR #646, closed PR #642, closed PR #633 |
|
||||
| #575 | closed | already closed | merged PR #656 |
|
||||
| #576 | closed | already closed | closed PR #663, closed PR #660, closed PR #655, closed PR #651, closed PR #646, closed PR #642, closed PR #633 |
|
||||
| #578 | closed | already closed | merged PR #638, closed PR #636 |
|
||||
| #636 | closed | already closed | issue already closed |
|
||||
| #638 | closed | already closed | issue already closed |
|
||||
| #547 | open | needs manual review | closed PR #730 |
|
||||
| #548 | open | needs manual review | closed PR #712 |
|
||||
| #549 | open | needs manual review | closed PR #729 |
|
||||
| #550 | open | needs manual review | closed PR #727 |
|
||||
| #551 | open | needs manual review | closed PR #725 |
|
||||
| #552 | open | needs manual review | closed PR #724 |
|
||||
| #553 | open | needs manual review | closed PR #722 |
|
||||
| #562 | open | needs manual review | closed PR #718 |
|
||||
| #544 | open | needs manual review | closed PR #732 |
|
||||
| #545 | open | needs manual review | closed PR #719 |
|
||||
| #547 | open | active pr | open PR #730 |
|
||||
| #548 | open | active pr | open PR #712 |
|
||||
| #549 | open | active pr | open PR #729 |
|
||||
| #550 | open | active pr | open PR #727 |
|
||||
| #551 | open | active pr | open PR #725 |
|
||||
| #552 | open | active pr | open PR #724 |
|
||||
| #553 | open | active pr | open PR #722 |
|
||||
| #562 | open | active pr | open PR #718 |
|
||||
| #544 | open | active pr | open PR #732 |
|
||||
| #545 | open | active pr | open PR #719 |
|
||||
|
||||
## Closure Candidates
|
||||
|
||||
These issues are still open but already have merged PR evidence in the forge and should be reviewed for bulk closure.
|
||||
|
||||
| Issue | State | Classification | PR Summary |
|
||||
|---|---|---|---|
|
||||
| #582 | open | closure candidate | merged PR #641, merged PR #639, merged PR #637, merged PR #631, merged PR #630 |
|
||||
| None |
|
||||
|---|
|
||||
| None |
|
||||
|
||||
## Still Open / Needs Manual Review
|
||||
|
||||
@@ -78,17 +78,18 @@ These issues either have no matching PR signal or still have an active PR / ambi
|
||||
|
||||
| Issue | State | Classification | PR Summary |
|
||||
|---|---|---|---|
|
||||
| #648 | open | needs manual review | closed PR #731 |
|
||||
| #547 | open | needs manual review | closed PR #730 |
|
||||
| #548 | open | needs manual review | closed PR #712 |
|
||||
| #549 | open | needs manual review | closed PR #729 |
|
||||
| #550 | open | needs manual review | closed PR #727 |
|
||||
| #551 | open | needs manual review | closed PR #725 |
|
||||
| #552 | open | needs manual review | closed PR #724 |
|
||||
| #553 | open | needs manual review | closed PR #722 |
|
||||
| #562 | open | needs manual review | closed PR #718 |
|
||||
| #544 | open | needs manual review | closed PR #732 |
|
||||
| #545 | open | needs manual review | closed PR #719 |
|
||||
| #648 | open | active pr | open PR #731 |
|
||||
| #582 | open | active pr | open PR #738 |
|
||||
| #547 | open | active pr | open PR #730 |
|
||||
| #548 | open | active pr | open PR #712 |
|
||||
| #549 | open | active pr | open PR #729 |
|
||||
| #550 | open | active pr | open PR #727 |
|
||||
| #551 | open | active pr | open PR #725 |
|
||||
| #552 | open | active pr | open PR #724 |
|
||||
| #553 | open | active pr | open PR #722 |
|
||||
| #562 | open | active pr | open PR #718 |
|
||||
| #544 | open | active pr | open PR #732 |
|
||||
| #545 | open | active pr | open PR #719 |
|
||||
|
||||
## Recommendation
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ class PullSummary:
|
||||
state: str
|
||||
merged: bool
|
||||
head: str
|
||||
body: str
|
||||
url: str
|
||||
|
||||
|
||||
@@ -76,8 +75,7 @@ def api_get(path: str, token: str):
|
||||
def collect_pull_summaries(repo: str, token: str) -> list[PullSummary]:
|
||||
pulls: list[PullSummary] = []
|
||||
for state in ("open", "closed"):
|
||||
page = 1
|
||||
while True:
|
||||
for page in range(1, 6):
|
||||
batch = api_get(f"/repos/{ORG}/{repo}/pulls?state={state}&limit=100&page={page}", token)
|
||||
if not batch:
|
||||
break
|
||||
@@ -89,18 +87,18 @@ def collect_pull_summaries(repo: str, token: str) -> list[PullSummary]:
|
||||
state=pr.get("state") or state,
|
||||
merged=bool(pr.get("merged")),
|
||||
head=(pr.get("head") or {}).get("ref") or "",
|
||||
body=pr.get("body") or "",
|
||||
url=pr.get("html_url") or pr.get("url") or "",
|
||||
)
|
||||
)
|
||||
page += 1
|
||||
if len(batch) < 100:
|
||||
break
|
||||
return pulls
|
||||
|
||||
|
||||
def match_prs(issue_num: int, pulls: Iterable[PullSummary]) -> list[PullSummary]:
|
||||
matches: list[PullSummary] = []
|
||||
for pr in pulls:
|
||||
text = f"{pr.title} {pr.head} {pr.body}"
|
||||
text = f"{pr.title} {pr.head}"
|
||||
if f"#{issue_num}" in text or pr.head == f"fix/{issue_num}" or f"/{issue_num}" in pr.head or f"-{issue_num}" in pr.head:
|
||||
matches.append(pr)
|
||||
return matches
|
||||
@@ -118,16 +116,12 @@ def classify_issue(issue: dict, related_prs: list[PullSummary]) -> IssueAuditRow
|
||||
else:
|
||||
merged = [pr for pr in related_prs if pr.merged]
|
||||
open_prs = [pr for pr in related_prs if pr.state == "open"]
|
||||
closed_unmerged = [pr for pr in related_prs if pr.state != "open" and not pr.merged]
|
||||
if merged:
|
||||
classification = "closure_candidate"
|
||||
pr_summary = summarize_prs(merged)
|
||||
elif open_prs:
|
||||
classification = "active_pr"
|
||||
pr_summary = summarize_prs(open_prs)
|
||||
elif closed_unmerged:
|
||||
classification = "needs_manual_review"
|
||||
pr_summary = summarize_prs(closed_unmerged)
|
||||
else:
|
||||
classification = "needs_manual_review"
|
||||
pr_summary = "no matching PR found"
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
from pathlib import Path
|
||||
|
||||
from scripts.burn_lane_issue_audit import (
|
||||
PullSummary,
|
||||
classify_issue,
|
||||
collect_pull_summaries,
|
||||
extract_issue_numbers,
|
||||
match_prs,
|
||||
render_report,
|
||||
)
|
||||
from scripts.burn_lane_issue_audit import extract_issue_numbers, render_report
|
||||
|
||||
|
||||
def test_extract_issue_numbers_handles_ranges_and_literals() -> None:
|
||||
@@ -21,99 +14,6 @@ def test_extract_issue_numbers_handles_ranges_and_literals() -> None:
|
||||
assert extract_issue_numbers(body) == [579, 660, 659, 658, 582, 627, 631, 547, 546, 545]
|
||||
|
||||
|
||||
def test_match_prs_detects_issue_ref_in_pr_body() -> None:
|
||||
pulls = [
|
||||
PullSummary(
|
||||
number=731,
|
||||
title="docs: verify session harvest report",
|
||||
state="open",
|
||||
merged=False,
|
||||
head="fix/session-harvest-report",
|
||||
body="Refs #648",
|
||||
url="https://forge.example/pr/731",
|
||||
),
|
||||
PullSummary(
|
||||
number=732,
|
||||
title="unrelated",
|
||||
state="open",
|
||||
merged=False,
|
||||
head="fix/unrelated",
|
||||
body="Refs #700",
|
||||
url="https://forge.example/pr/732",
|
||||
),
|
||||
]
|
||||
|
||||
assert [pr.number for pr in match_prs(648, pulls)] == [731]
|
||||
|
||||
|
||||
|
||||
def test_open_issue_with_closed_unmerged_pr_stays_manual_review_with_history() -> None:
|
||||
issue = {
|
||||
"number": 648,
|
||||
"title": "session harvest report",
|
||||
"state": "open",
|
||||
"html_url": "https://forge.example/issues/648",
|
||||
}
|
||||
row = classify_issue(
|
||||
issue,
|
||||
[
|
||||
PullSummary(
|
||||
number=731,
|
||||
title="docs: add session harvest report",
|
||||
state="closed",
|
||||
merged=False,
|
||||
head="fix/648",
|
||||
body="Closes #648",
|
||||
url="https://forge.example/pr/731",
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
assert row.classification == "needs_manual_review"
|
||||
assert row.pr_summary == "closed PR #731"
|
||||
|
||||
|
||||
|
||||
def test_collect_pull_summaries_pages_until_empty(monkeypatch) -> None:
|
||||
def fake_api_get(path: str, token: str):
|
||||
if "state=open" in path:
|
||||
return []
|
||||
page = int(path.split("page=")[1])
|
||||
if page <= 5:
|
||||
return [
|
||||
{
|
||||
"number": page * 1000 + i,
|
||||
"title": f"page {page} pr {i}",
|
||||
"state": "closed",
|
||||
"merged": False,
|
||||
"head": {"ref": f"fix/{page}-{i}"},
|
||||
"body": f"Refs #{page * 1000 + i}",
|
||||
"html_url": f"https://forge.example/pr/{page * 1000 + i}",
|
||||
}
|
||||
for i in range(100)
|
||||
]
|
||||
if page == 6:
|
||||
return [
|
||||
{
|
||||
"number": 900,
|
||||
"title": "late page pr",
|
||||
"state": "closed",
|
||||
"merged": False,
|
||||
"head": {"ref": "fix/900"},
|
||||
"body": "Refs #900",
|
||||
"html_url": "https://forge.example/pr/900",
|
||||
}
|
||||
]
|
||||
return []
|
||||
|
||||
monkeypatch.setattr("scripts.burn_lane_issue_audit.api_get", fake_api_get)
|
||||
|
||||
pulls = collect_pull_summaries("timmy-home", "token")
|
||||
|
||||
assert any(pr.number == 900 for pr in pulls)
|
||||
|
||||
|
||||
|
||||
def test_render_report_calls_out_drift_and_candidates() -> None:
|
||||
rows = [
|
||||
{
|
||||
|
||||
52
tests/test_issue_680_verification.py
Normal file
52
tests/test_issue_680_verification.py
Normal file
@@ -0,0 +1,52 @@
|
||||
"""
|
||||
Verification test for issue #680 — fleet-ops genome deliverable.
|
||||
|
||||
Locks the evidence trail proving the genome document and its
|
||||
regression test already exist on main.
|
||||
"""
|
||||
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
GENOME_PATH = ROOT / "genomes" / "fleet-ops-GENOME.md"
|
||||
REGRESSION_TEST = ROOT / "tests" / "test_fleet_ops_genome.py"
|
||||
VERIFICATION_DOC = ROOT / "docs" / "issue-680-verification.md"
|
||||
|
||||
|
||||
class TestIssue680Verification(unittest.TestCase):
|
||||
"""Confirm the #680 deliverable is present on main."""
|
||||
|
||||
def test_genome_document_exists(self):
|
||||
self.assertTrue(
|
||||
GENOME_PATH.exists(),
|
||||
"genomes/fleet-ops-GENOME.md must exist (issue #680 deliverable)",
|
||||
)
|
||||
|
||||
def test_genome_document_is_substantial(self):
|
||||
text = GENOME_PATH.read_text(encoding="utf-8")
|
||||
self.assertIn("# GENOME.md — fleet-ops", text)
|
||||
self.assertIn("## Project Overview", text)
|
||||
self.assertIn("## Architecture", text)
|
||||
self.assertGreaterEqual(len(text), 7000, "genome should be >= 7000 chars")
|
||||
|
||||
def test_regression_test_exists(self):
|
||||
self.assertTrue(
|
||||
REGRESSION_TEST.exists(),
|
||||
"tests/test_fleet_ops_genome.py must exist as regression guard",
|
||||
)
|
||||
|
||||
def test_verification_doc_exists(self):
|
||||
self.assertTrue(
|
||||
VERIFICATION_DOC.exists(),
|
||||
"docs/issue-680-verification.md must exist",
|
||||
)
|
||||
|
||||
def test_verification_doc_mentions_prior_prs(self):
|
||||
text = VERIFICATION_DOC.read_text(encoding="utf-8")
|
||||
self.assertIn("#697", text, "should reference PR #697")
|
||||
self.assertIn("#770", text, "should reference PR #770")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user