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-investigator.lock.yml

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

16 changes: 14 additions & 2 deletions .github/workflows/upstreaming-investigator.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,16 @@ call: `{"path": "upstreaming-out"}` (the native handler names the artifact
for `park`;
- `allowed_paths`: 1..32 exact relative paths or directory globs with a
single final wildcard component for `develop`, and an empty list for
`park`. Never use `*`, `**`, absolute paths, `.git`, or `..`.
`park`. Never use `*`, `**`, absolute paths, `.git`, or `..`;
- `path_coverage`: exactly one assessment for each of `build`, `test`,
`release`, `packaging`, `documentation`, and `native_sources`. Each entry
lists every repository path that may need a riscv64 change in that area,
or an empty path list with a source-grounded explanation. For `develop`,
every listed path must be matched by `allowed_paths`. Inspect sibling
workflows, called reusable workflows, action files, build configuration,
package metadata, native source dispatch, support documentation, artifact
validation, and release/publish consumers. Do not scope only the first file
that appears sufficient.

A `develop` decision automatically provisions the fork and starts development;
it does not wait for scope approval. A `park` decision stops work but can be
Expand All @@ -468,7 +477,10 @@ call: `{"path": "upstreaming-out"}` (the native handler names the artifact
that stop CI from running on a fork;
- contribution rules: CONTRIBUTING, commit conventions, CLA/DCO;
- any existing riscv64 work upstream (issues, PRs, CI);
- proposed admission class, allowed paths, target matrix, and risks.
- proposed admission class, complete multi-path coverage, allowed paths,
target matrix, and risks. Trace the full build-to-test-to-release graph and
include all files that may require modification, even when the initial
patch is expected to touch only a subset.
- `proposal.json`: a JSON object matching
`upstreaming/schemas/proposal.schema.json` in the control repository,
with `outcome: "investigation"`, `operation: "none"`, and
Expand Down
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.

9 changes: 8 additions & 1 deletion .github/workflows/upstreaming-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,14 @@ re-applies your series in a fresh repository, validates it against the
approved scope and pushes it to `riscv64` itself. Anything outside
`allowed_paths`, any `{debug}` commit when `upstream_facing` is true, any
`pull_request_target`, new secret, or interpolation of untrusted event text into
scripts is rejected.
scripts is rejected. For a repair backed by authorized review feedback,
`review_scope_extension` is true. Natural-language review feedback may require
an exact file that the original dossier missed. Research the request, include
that exact repository-relative path in `changed_files`, and make the requested
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.

## 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 @@ -23,3 +23,4 @@
- Updated acceptance validation so state-only pushes may trigger exactly `website.yml`, preserving the rule that they never wake pipeline control or model workflows.
- 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.
10 changes: 10 additions & 0 deletions upstreaming/INTEGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,16 @@ the intentionally credentialless destination organization. A build or test
failure discovered after handoff automatically returns the contribution to
revisioned development repair.

The investigation dossier assesses path coverage separately for build, test,
release, packaging, documentation and native sources. Its multi-path
`allowed_paths` must cover every path found by that assessment and is preserved
through contribution state, Work and publication. If an authorized reviewer
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.

Previously merged implementation:

- The native artifact patch now separates artifact descriptors from private
Expand Down
12 changes: 9 additions & 3 deletions upstreaming/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ pilot details are kept in lifecycle state and diagnostic artifacts, not here.
`notify` job posts a bounded readable summary to the tracking issue. The
controller records the dossier as evidence. A machine-readable, trusted-gated
dossier decision either moves directly to `provisioning` with a bounded
admission class and path set, or moves to `parked` when no concrete patch is
actionable. Neither route waits for scope approval. An authorized human may
admission class and multi-path set, or moves to `parked` when no concrete
patch is actionable. The dossier must separately assess build, test, release,
packaging, documentation and native-source paths, and its allowed path set
must cover every path found. Neither route waits for scope approval. An authorized human may
override a parked decision with:

```text
Expand Down Expand Up @@ -210,7 +212,11 @@ pilot details are kept in lifecycle state and diagnostic artifacts, not here.
and PR conversation comments from authorized reviewers. Feedback bound to the
current head is persisted as `human_relay` evidence, processed once, and
automatically starts a revisioned repair with the exact reviewer, URL, path,
line and text in task context. Passing means every required riscv64 job and
line and text in task context. Ordinary natural-language review feedback may
require another file without any command syntax. A human-relay-backed repair
may identify that exact path; trusted publication validates the actual diff
and persists the verified path into contribution scope. Passing means every
required riscv64 job and
wheel artifact satisfy the project-specific frozen topology contract.
5. **Upstream handoff.** When the exact development head passes its frozen CI
contract and has no debug commits, observation automatically records it as the
Expand Down
7 changes: 5 additions & 2 deletions upstreaming/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,11 @@ def cmd_plan(args) -> int:
for evidence_id in req.get("reason_ids") or []:
evidence = snap.evidence.get(evidence_id)
if evidence:
reason_evidence.append({key: evidence.get(key) for key in
("evidence_id", "kind", "summary", "limitations")})
item = {key: evidence.get(key) for key in
("evidence_id", "kind", "summary", "limitations")}
if evidence.get("kind") == "human_relay":
item["data"] = evidence.get("data")
reason_evidence.append(item)
nodes.append(work.node(req, rec, control_repo_id=args.control_repo_id,
allowed_paths=rec.get("scope_paths") or ctr.get("allowed_paths")
or [".github/workflows/*"],
Expand Down
16 changes: 16 additions & 0 deletions upstreaming/dossier_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"""
from __future__ import annotations

import fnmatch
import hashlib
import json
import os
Expand Down Expand Up @@ -57,11 +58,26 @@ def validate(dossier: dict, proposal: dict, task: dict) -> None:
if issue["url"] not in {s["url"] for s in dossier["research"]["tracking_issue"]["sources"]}:
raise DossierError("tracking-issue research must cite the original issue URL")
decision = dossier["proposal"]
coverage = decision["path_coverage"]
areas = [entry["area"] for entry in coverage]
required_areas = {"build", "test", "release", "packaging", "documentation", "native_sources"}
if set(areas) != required_areas or len(areas) != len(set(areas)):
raise DossierError("path_coverage must assess each required area exactly once")
covered_paths = [path for entry in coverage for path in entry["paths"]]
if covered_paths:
try:
validate_scope_paths(covered_paths)
except ValueError as exc:
raise DossierError(f"path_coverage: {exc}") from None
if decision["decision"] == "develop":
try:
validate_scope_paths(decision["allowed_paths"])
except ValueError as exc:
raise DossierError(str(exc)) from None
missing = [path for path in covered_paths if not any(
fnmatch.fnmatchcase(path, allowed) for allowed in decision["allowed_paths"])]
if missing:
raise DossierError(f"allowed_paths omit researched riscv64 paths: {sorted(set(missing))}")


def _read(root: Path, relative: Path, limit: int = 256 * 1024) -> str:
Expand Down
Loading