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
2 changes: 1 addition & 1 deletion .github/workflows/upstreaming-worker.lock.yml

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

4 changes: 4 additions & 0 deletions .github/workflows/upstreaming-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ change without asking the reviewer to use command syntax. The trusted publisher
will admit only the exact changed paths in this repair and persist verified
additions to contribution scope. This does not permit globs or unrelated files.
Inline review comment paths are present in the human-relay evidence data.
For contributions whose dossier predates mandatory path coverage,
`legacy_scope_extension` is true during repair. CI evidence may then justify an
additional exact file under the same rules. This compatibility path is absent
for new, complete dossiers.

## Mandatory change-history research

Expand Down
1 change: 1 addition & 0 deletions SESSIONLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@
- Addressed PR #4989 review feedback by moving the status-page generator into `upstreaming/`, invoking it through `uv run`, and adding focused rendering coverage.
- Fixed review and CI reconciliation so pending human feedback survives head changes, every repair carries and acknowledges all feedback evidence, `fix_needed` cannot be overwritten before dispatch, and any executed build or test failure returns handoff to automated development repair.
- Replaced the rejected workflow-glob approach with complete dossier path coverage and natural-language review scope extension: human-relay-backed repairs may add exact changed paths, which trusted publication verifies and persists without requiring command syntax.
- Added an exact-path repair compatibility flag for live contributions whose dossiers predate mandatory path coverage; new dossiers are marked coverage-complete and cannot use the legacy allowance.
5 changes: 4 additions & 1 deletion upstreaming/INTEGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ later asks in ordinary natural language for a change that requires another
file, the human-relay-backed repair may identify and change that additional
exact path without command syntax. The trusted publisher admits only exact
paths actually changed by that repair, applies all existing content and workflow
safety checks, and persists the verified paths into contribution scope.
safety checks, and persists the verified paths into contribution scope. Live
contributions whose dossiers predate mandatory path coverage receive the same
exact-path compatibility only during repair; new dossiers are marked complete
and cannot use that legacy allowance.

Previously merged implementation:

Expand Down
2 changes: 1 addition & 1 deletion upstreaming/fork_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def publish(*, record: dict, task: dict, proposal: dict, mbox: bytes, token: str
outside_scope = sorted(path for path in claimed if not any(
fnmatch.fnmatchcase(path, allowed) for allowed in scope.allowed_globs))
if outside_scope:
if not task.get("review_scope_extension"):
if not (task.get("review_scope_extension") or task.get("legacy_scope_extension")):
return Outcome("rejected", f"proposal changes files outside admitted scope: {outside_scope}",
candidate=cand, failure_class="validation")
if any(any(ch in path for ch in "*?[]") for path in outside_scope):
Expand Down
1 change: 1 addition & 0 deletions upstreaming/reconcile.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ def apply_publication(rec: dict, outcome: dict, *, now: str, policy: dict | None
new["activity"] = "idle"
new["admission_class"] = dossier["proposal"]["admission_class"]
new["scope_paths"] = list(dossier["proposal"]["allowed_paths"])
new["scope_coverage_complete"] = True
new["pending_human_action"] = None
new["revision"] += 1
staged.append(("events", lifecycle._event(rec, new, "dossier_develop", "observation",
Expand Down
3 changes: 3 additions & 0 deletions upstreaming/schemas/contribution.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,9 @@
}
]
},
"scope_coverage_complete": {
"type": "boolean"
},
"scope_paths": {
"anyOf": [
{
Expand Down
5 changes: 5 additions & 0 deletions upstreaming/tests/test_dossier_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ def test_authorized_human_relay_enables_natural_review_scope_extension(self):
ordinary = work.node(request, rec, control_repo_id="7", allowed_paths=["build.yml"],
context={"reason_evidence": [{"evidence_id": "ci-1", "kind": "ci"}]})
self.assertFalse(ordinary["payload"]["review_scope_extension"])
self.assertTrue(ordinary["payload"]["legacy_scope_extension"])
rec["scope_coverage_complete"] = True
complete = work.node(request, rec, control_repo_id="7", allowed_paths=["build.yml"],
context={"reason_evidence": [{"evidence_id": "ci-1", "kind": "ci"}]})
self.assertFalse(complete["payload"]["legacy_scope_extension"])

def test_full_description_url_and_links_frozen_into_work(self):
body = "### Additional context\n\nhttps://github.com/example/proj/pull/31488\n" + "user context\n" * 500
Expand Down
1 change: 1 addition & 0 deletions upstreaming/tests/test_observation.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ def test_investigation_outcome_auto_admits_development(self):
self.assertEqual((final["phase"], final["activity"], final["revision"]), ("provisioning", "waiting_capacity", 1))
self.assertEqual(final["admission_class"], "configuration_integration")
self.assertEqual(final["scope_paths"], [".github/workflows/*", "README.rst"])
self.assertTrue(final["scope_coverage_complete"])
self.assertIsNone(final["pending_human_action"])
self.assertIsNone(final["proposal_artifact"])
self.assertEqual(len(out.report["provision_requests"]), 1)
Expand Down
2 changes: 2 additions & 0 deletions upstreaming/work.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def payload(request: dict, record: dict, *, control_repo_id: str, allowed_paths:
"allowed_paths": allowed_paths,
"review_scope_extension": task in ("development_repair", "upstream_revision") and any(
item.get("kind") == "human_relay" for item in context.get("reason_evidence") or []),
"legacy_scope_extension": task in ("development_repair", "upstream_revision")
and record.get("scope_coverage_complete") is not True,
"distributions": record.get("distributions") or [],
"admission_class": record.get("admission_class"),
"reason_ids": request.get("reason_ids") or [],
Expand Down