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
5 changes: 3 additions & 2 deletions .github/workflows/upstreaming-worker.lock.yml

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

35 changes: 31 additions & 4 deletions .github/workflows/upstreaming-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ pre-agent-steps:
- name: Check out the contribution fork at the expected head (read-only)
env:
GH_AW_ACTIONS_DIR: ${{ runner.temp }}/gh-aw/actions
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
node <<'JS'
Expand All @@ -92,6 +93,26 @@ pre-agent-steps:
fs.writeFileSync("/tmp/gh-aw/agent/task.json", JSON.stringify(w, null, 2));
JS
task=/tmp/gh-aw/agent/task.json
dossier_count=$(jq '[.context.reason_evidence[]? | select(.kind == "dossier" and .reference)] | length' "$task")
[ "$dossier_count" -le 1 ] || { echo "multiple dossier references"; exit 1; }
if [ "$dossier_count" -eq 1 ]; then
repository=$(jq -r '.context.reason_evidence[] | select(.kind == "dossier").reference.repository' "$task")
ref=$(jq -r '.context.reason_evidence[] | select(.kind == "dossier").reference.ref' "$task")
path=$(jq -r '.context.reason_evidence[] | select(.kind == "dossier").reference.path' "$task")
expected=$(jq -r '.context.reason_evidence[] | select(.kind == "dossier").reference.sha256' "$task")
evidence_id=$(jq -r '.context.reason_evidence[] | select(.kind == "dossier").evidence_id' "$task")
[ "$repository" = "riseproject-dev/python-wheels" ] || { echo "bad dossier repository"; exit 1; }
[[ "$ref" =~ ^[0-9a-f]{40}$ ]] || { echo "bad dossier ref"; exit 1; }
[[ "$path" =~ ^upstreaming-state/evidence/[A-Za-z0-9._-]+\.json$ ]] || { echo "bad dossier path"; exit 1; }
[[ "$expected" =~ ^[0-9a-f]{64}$ ]] || { echo "bad dossier digest"; exit 1; }
gh api -H 'Accept: application/vnd.github.raw+json' \
"/repos/$repository/contents/$path?ref=$ref" > /tmp/gh-aw/agent/dossier.json
actual=$(sha256sum /tmp/gh-aw/agent/dossier.json | cut -d' ' -f1)
[ "$actual" = "$expected" ] || { echo "dossier digest mismatch"; exit 1; }
jq -e --arg id "$evidence_id" '.kind == "dossier" and .evidence_id == $id' \
/tmp/gh-aw/agent/dossier.json >/dev/null
echo "verified complete dossier $evidence_id at /tmp/gh-aw/agent/dossier.json"
fi
fork=$(jq -r '.fork // empty' "$task")
upstream=$(jq -r '.upstream' "$task")
head=$(jq -r '.expected_head // empty' "$task")
Expand Down Expand Up @@ -298,10 +319,16 @@ pipeline. The trusted pre-agent step wrote the immutable task to
branch in `./fork`. The task's
`plan` field says what to do; `reason_ids` and `context` say why. For repair and
revision tasks, read every entry in `context.reason_evidence` before researching
or editing. A `dossier` evidence entry includes the latest verified dossier in
`data`; treat its path coverage, dependency findings, architecture precedent and
risks as the authoritative current investigation, while still validating them
against current repository history and CI. Treat every concrete review comment,
or editing. A `dossier` evidence entry identifies the latest verified dossier.
Its complete authoritative record is committed at the immutable `reference`;
`data` is only its queue-safe index. The trusted pre-agent step fetches that
exact-ref file, verifies its SHA-256 and evidence identity, and writes it to
`/tmp/gh-aw/agent/dossier.json`. You MUST read the latest verified dossier from
that complete local file when it exists. The reference also contains its
immutable raw GitHub URL for provenance. Treat the latest verified dossier's
path coverage, dependency findings, architecture precedent and risks as the
authoritative current investigation, while still validating them against
current repository history and CI. Treat every concrete review comment,
PR conversation comment and
rejected-change description in every reason evidence record as a required
repair constraint, then verify each one against repository history. A repair is
Expand Down
3 changes: 3 additions & 0 deletions SESSIONLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@
- Corrected paused-feedback ledger wording so actionable feedback remains visibly pending without claiming repair Work was requested while pause prevents allocation.
- Changed fast command receipt reactions from `+1` to `eyes` and added an idempotent post-state-commit `+1` only for commands accepted and durably executed by serialized reconciliation.
- Made pause the primary visible status in lifecycle ledgers and the public status page while retaining the underlying activity as pending context; paused ledgers no longer suggest another pause command.
- Diagnosed dispatcher failures as queue payload-limit violations from embedding complete dossier research in Work, then added a bounded projection preserving IDs, exact paths, response contracts, path coverage, dependency findings and risks plus a pre-staging byte-budget guard.
- Kept the complete dossier as committed evidence and added an immutable exact-ref path/raw URL/SHA-256 reference; trusted worker setup now fetches and verifies it into `/tmp/gh-aw/agent/dossier.json` for mandatory worker reading while the queue carries only a bounded projection.
- Restored worker-facing wording that names the complete authoritative record as “the latest verified dossier,” while describing bounded `data` only as its queue-safe index.
13 changes: 12 additions & 1 deletion upstreaming/INTEGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,18 @@ records processed review/comment IDs, bumps the revision and automatically
requests `development_repair`. Pending feedback evidence survives branch-head
changes and is attached to every repair until exact-head CI is green. A repair
proposal must acknowledge every required evidence record. Observation does not
replace `fix_needed` before the controller can allocate that repair.
replace `fix_needed` before the controller can allocate that repair. Dispatcher
Work carries a deterministic bounded projection of those durable records rather
than embedding the complete dossier research corpus: evidence IDs, response IDs,
exact paths, proposal/path coverage, architecture/build/dependency findings and
risks are retained, while repeated prose and the full source-by-source research
appendix remain in the complete committed dossier evidence file. The Work also
carries an immutable control-repository ref, exact evidence path, raw GitHub URL
and SHA-256 for that file. Before the model starts, trusted worker setup fetches
it with the read-only job token, verifies the digest and evidence identity, and
places the complete dossier at `/tmp/gh-aw/agent/dossier.json`; the worker must
read it. Trusted preparation rejects a payload before queue staging if it
exceeds the queue's safe byte budget.
Explanation-only comments are classified separately as `human_inquiry` when
an explicit no-change instruction is present, or when they clearly request an
explanation without a repair instruction. They are marked processed and retained
Expand Down
Loading