Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
permissions:
contents: read
pull-requests: read
uses: wellmanifest/new-project/.github/workflows/governance.yml@d31beca68b9964c6af493a44974b247626294b65
uses: wellmanifest/new-project/.github/workflows/governance.yml@d1f35ed1b8be60f50a6739984c947a30379ead5b
with:
standard-ref: d31beca68b9964c6af493a44974b247626294b65
standard-ref: d1f35ed1b8be60f50a6739984c947a30379ead5b
trusted-reviewers: ${{ vars.TRUSTED_REVIEWERS }}
trusted-validator-apps: ${{ vars.TRUSTED_VALIDATOR_APPS }}

Expand Down
27 changes: 25 additions & 2 deletions .governance/governance_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -4030,11 +4030,33 @@ def resolve_changed_paths(
return []


def published_adoption_validation_base(root: Path, delivery: dict[str, Any], head: str) -> str | None:
"""Bound implicit adoption validation without changing ticket authority.

A historical IN_PROGRESS adoption may remain in a fresh published checkout
without its external terminal receipt. Validate the latest integration's
diff there, not every delivery since that adoption. Require origin evidence;
a local target branch alone does not establish published state.
"""
try:
target_ref = f"refs/remotes/origin/{delivery['targetBranch']}"
target = git_output(root, ["rev-parse", "--verify", f"{target_ref}^{{commit}}"]).decode().strip()
if git_output(root, ["rev-parse", "--verify", f"{head}^{{commit}}"]).decode().strip() != target:
return None
parent = git_output(root, ["rev-parse", "--verify", f"{target}^1"]).decode().strip()
if is_published_integration(root, target, parent):
return parent
except (subprocess.CalledProcessError, FileNotFoundError):
pass
return None


def resolve_validation_base(
supplied_base: str | None,
root: Path,
records: list[TicketRecord],
config: dict[str, Any],
head: str = "HEAD",
) -> str | None:
if supplied_base is not None:
return supplied_base
Expand All @@ -4044,7 +4066,8 @@ def resolve_validation_base(
return None
record = adoption_records[0]
assert record.intent is not None
return record.intent["delivery"]["acceptedBaseSha"]
delivery = record.intent["delivery"]
return published_adoption_validation_base(root, delivery, head) or delivery["acceptedBaseSha"]


def check_change_lease(root: Path, report: Report) -> None:
Expand Down Expand Up @@ -4099,7 +4122,7 @@ def run_governance_checks(
records = load_ticket_records(directories, manifest["ticket"])
else:
directories = [record.directory for record in records]
base = resolve_validation_base(args.base, root, records, manifest["ticket"])
base = resolve_validation_base(args.base, root, records, manifest["ticket"], args.head)
changed = resolve_changed_paths(args, root, base, report)
active = active_ticket_records(root, manifest["ticket"], records, report)
changed_active = [
Expand Down
2 changes: 1 addition & 1 deletion .governance/manifest.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"stacks": [],
"standard": {
"id": "wellmanifest/new-project",
"version": "0.20.20"
"version": "0.20.21"
},
"ticket": {
"activeStatuses": [
Expand Down
2 changes: 1 addition & 1 deletion .governance/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
],
"standard": {
"id": "wellmanifest/new-project",
"version": "0.20.20"
"version": "0.20.21"
},
"ticket": {
"activeStatuses": [
Expand Down
8 changes: 4 additions & 4 deletions .governance/manifest.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
".governance/error/GOV-WORKTREE-OVERLAP.md": "65a2533f13e63d6ebeeb63c07adc0794ea9e04075a91e873eff2d79910239b0e",
".governance/error/README.md": "e8486dd29f52ca3fee96ed6881a62c38141864cde5aa1adea2b16d22b2feefaa",
".governance/generate_required_checks.py": "a017f06203e3c186dd97bc3c3a183e0352f5f11b2f49701e61cac98e86c00cba",
".governance/governance_check.py": "8a12285fbb806678784725fe52d6f4bc52f4d5899ddb1af8078063e098d86acc",
".governance/governance_check.py": "5336377d54ab8239cf1b1c7ee576523cc6e134d3f817be940c4248d88bbff01d",
".governance/intent.schema.json": "7baa32440e3ae5bf1ada32359154b35038134ba2dee4dbf25d9435a12f62ab0c",
".governance/lock.schema.json": "ad80c98f800a4a3310870336dcdaf0aa689cc4988f71084d25d76bea2df1242f",
".governance/manifest.base.json": "616a4acd56d70e6dbac70f8eed6e8efd469560efbc7af043fce58d9d7bb5341b",
".governance/manifest.base.json": "986b581a686cd526eca602fcc0ec25042e0c21f907f24e60cce415490481461b",
".governance/manifest.schema.json": "5aa2ccd3f6898834d4e39a78342448145490be56aa132e16ac7c9d64acef8f73",
".governance/package-manifest.json": "a06a0b84d9b4f9f9c30b5523e40db50f33de3490b1006c29cd03cd1e2b58b1b2",
".governance/precommit_standard_update.py": "c91e2bf9ae9d6ccc77bce0e61450c818a5961edee5bfde3b60426da88e296b0f",
Expand Down Expand Up @@ -94,7 +94,7 @@
"id": "wellmanifest/new-project",
"publicationStatus": "published",
"sourceRepository": "wellmanifest/new-project",
"sourceRevision": "d31beca68b9964c6af493a44974b247626294b65",
"version": "0.20.20"
"sourceRevision": "d1f35ed1b8be60f50a6739984c947a30379ead5b",
"version": "0.20.21"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"email": "tom@sapletta.com"
},
"wellmanifest": {
"standard": "0.20.20",
"revision": "d31beca68b9964c6af493a44974b247626294b65",
"standard": "0.20.21",
"revision": "d1f35ed1b8be60f50a6739984c947a30379ead5b",
"gate": "project/governance-check.sh"
}
}
36 changes: 36 additions & 0 deletions project/ticket-102/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

107 changes: 107 additions & 0 deletions project/ticket-102/intent.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ packages = ["todo2code"]
py-modules = ["todo2code_sdk"]

[tool.wellmanifest]
standard = "0.20.20"
revision = "d31beca68b9964c6af493a44974b247626294b65"
standard = "0.20.21"
revision = "d1f35ed1b8be60f50a6739984c947a30379ead5b"
gate = "project/governance-check.sh"

[tool.pytest.ini_options]
Expand Down
Loading