Record ADR conflicts and publish the estate arc42
Some checks failed
Build and publish policy-nexus image / build-and-push (push) Failing after 39s
Some checks failed
Build and publish policy-nexus image / build-and-push (push) Failing after 39s
T03 writes a rulings overlay and a readable conflict list. T04 starts relevance: five superseded, five live conflicts, estate and activity-core ADRs marked publish-after-prefix. The Coulomb estate map is now a published architecture document.
This commit is contained in:
parent
9c6a1d3ce0
commit
d1f9ac6cd7
17 changed files with 1263 additions and 126 deletions
|
|
@ -76,3 +76,94 @@ class AdrReviewLedgerTest(unittest.TestCase):
|
|||
rows["alpha/docs/adr/ADR-0001-one.md"]["bare_adr_collisions"],
|
||||
)
|
||||
self.assertEqual("unreviewed", rows["alpha/docs/adr/ADR-0001-one.md"]["proposed_disposition"])
|
||||
|
||||
def test_rulings_overlay_and_shared_id_kind_one(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = Path(directory)
|
||||
(root / "alpha/docs/adr").mkdir(parents=True)
|
||||
(root / "beta/docs/adr").mkdir(parents=True)
|
||||
(root / "alpha/docs/adr/one.md").write_text(
|
||||
"---\nid: ADR-001\ntitle: One\nstatus: accepted\nowner: alpha\n"
|
||||
"revision: 1\nlast_reviewed: \"2026-08-18\"\nreview_interval: 6m\n---\n# One\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
(root / "beta/docs/adr/two.md").write_text(
|
||||
"---\nid: ADR-001\ntitle: Two\nstatus: accepted\nowner: beta\n"
|
||||
"revision: 1\nlast_reviewed: \"2026-08-18\"\nreview_interval: 6m\n---\n# Two\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
config = root / "source-inventory.config.json"
|
||||
config.write_text(
|
||||
json.dumps(
|
||||
{
|
||||
"schema_version": 1,
|
||||
"repositories": {
|
||||
"alpha": {
|
||||
"branch": "main",
|
||||
"remote": "https://example.invalid/a.git",
|
||||
"selectors": ["docs/adr/*.md"],
|
||||
},
|
||||
"beta": {
|
||||
"branch": "main",
|
||||
"remote": "https://example.invalid/b.git",
|
||||
"selectors": ["docs/adr/*.md"],
|
||||
},
|
||||
},
|
||||
}
|
||||
),
|
||||
encoding="utf-8",
|
||||
)
|
||||
inventory = root / "source-inventory.json"
|
||||
inventory.write_text(
|
||||
json.dumps(
|
||||
{
|
||||
"schema_version": 1,
|
||||
"sources": [
|
||||
{
|
||||
"source_repo": "alpha",
|
||||
"source_path": "docs/adr/one.md",
|
||||
"disposition": "metadata-pending",
|
||||
"reason": "pending",
|
||||
},
|
||||
{
|
||||
"source_repo": "beta",
|
||||
"source_path": "docs/adr/two.md",
|
||||
"disposition": "metadata-pending",
|
||||
"reason": "pending",
|
||||
},
|
||||
],
|
||||
}
|
||||
),
|
||||
encoding="utf-8",
|
||||
)
|
||||
rulings = root / "rulings.json"
|
||||
rulings.write_text(
|
||||
json.dumps(
|
||||
{
|
||||
"schema_version": 1,
|
||||
"rulings": [
|
||||
{
|
||||
"source_repo": "beta",
|
||||
"source_path": "docs/adr/two.md",
|
||||
"proposed_disposition": "conflict",
|
||||
"conflict_kinds": [6],
|
||||
"successor": "",
|
||||
"review_notes": "duplicate claim",
|
||||
}
|
||||
],
|
||||
}
|
||||
),
|
||||
encoding="utf-8",
|
||||
)
|
||||
ledger = build_ledger(
|
||||
inventory,
|
||||
config,
|
||||
policy_root=root,
|
||||
source_root=root,
|
||||
rulings_path=rulings,
|
||||
)
|
||||
rows = {f"{row['source_repo']}/{row['source_path']}": row for row in ledger["rows"]}
|
||||
self.assertEqual("unreviewed", rows["alpha/docs/adr/one.md"]["proposed_disposition"])
|
||||
self.assertIn(1, rows["alpha/docs/adr/one.md"]["conflict_kinds"])
|
||||
self.assertEqual("conflict", rows["beta/docs/adr/two.md"]["proposed_disposition"])
|
||||
self.assertEqual([6, 1], rows["beta/docs/adr/two.md"]["conflict_kinds"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue