Skip to content

fix(gh-aw): finalize activation bindings and reconcile without creating issues - #2204

Merged
bradygaster merged 11 commits into
devfrom
bradygaster-activation-binding-recovery
Oct 12, 2026
Merged

bradygaster merged 11 commits into
devfrom
bradygaster-activation-binding-recovery

Conversation

@bradygaster

@bradygaster bradygaster commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

What

Add deterministic actual-ID activation finalization, explicit current-state no-create reconciliation, safe phase continuation, and SDK/checker consumption. Working as agentic-workflows-dev (Agentic Workflows Engineer); rejected-source revisions were independently authored. Merged #2202 remains unchanged.

Why

Closes #2203. Creating issues is insufficient if published bindings contain unresolved references or invalid identity. Duplicate creation is not recovery, and a concurrent run's valid comment cannot establish this run's publication.

How

Freeze and validate plan, registry, stable IDs, dependencies, authorization and complete outgoing issue-body bounds, including pinned sanitizer/attribution formatting. Retry-safe prerequisites precede admission; durable pending/start evidence precedes every create. Actual pinned runtime results drive finalization. Ambiguous creates never authorize recreation. Code-aware parsing prevents examples from becoming operational commands/tasks.

Preserve original records. Eligible hash-bound requests provide complete existing-issue mappings for current-state reconciliation, not historical attestation. Source/request/evidence phases must match. Expanding ancestry requires a nonempty, strictly shorter positional prefix; whole-plan predecessors cannot expand, and every explicitly selected phase must exist in the frozen plan. Sparse phase IDs remain valid. Validate prior maps, hashes, dependency closure and current API parents. Dependency-token corrections include readback; GitHub updates are not transactional.

The trusted deterministic writer validates actual publication receipts and API readbacks before reporting current-run completion. Historical collectors do not certify the completed run's publication. Automatic historical audits retain triggers but bound discovery to a 24-hour hint, five discovery pages, five origins and ten initial history pages per origin, with a shared 250-request ceiling across collection and canonical verification. Truncation/exhaustion/missing evidence fail explicitly. Manual full audit remains available; timestamps never establish current-run attribution.

Native installation packages 20 resources (19 shared plus the top-level checker) through supported staging and verified ownership/materialization; differing pre-existing checker files are preserved. No permission, credential, foreign-write, dispatch-policy or revision-trust-policy expansion.

Final reviewed head: f558617be67e51dc0ef8b6223e739e5369ec5b07; tree: 5536d8ed87bb726f937e949f3686b669caaec555. The 41-path scope is justified by the coupled producer/verifier/SDK/checker contract, native generated resources and regression coverage; no files deleted. Independent specialists corrected rejected source; the original author mechanically integrated, generated and validated it.

Final exact-head independent/hosted disposition: Security/recovery correctness APPROVE; Lead and Quality approve the narrow substitutions below. Hosted CI is green and all 11 inline threads are resolved. The final hosted keyword-casing usability observation is tracked separately in #2205: documented lowercase reconciliation works and unsupported spelling explicitly rejects. No remaining acceptance/recovery blocker; no gate waived for latency.


⚠️ Quick Check

  • If SDK/CLI source files changed: completed the applicable Changeset step below (npx changeset add / .changeset/*.md, direct CHANGELOG.md entry for maintainers, or skip-changelog label for no user-facing changes)

PR Readiness Checklist

The PR readiness bot will validate these automatically after push.
Check each item before requesting review. See CONTRIBUTING.md for full details.

Branch & Commit

  • Branch created from dev (not main)
  • Branch is up to date with dev (git fetch upstream && git rebase upstream/dev)
  • Verified diff contains only intended changes (git diff --cached --stat)
  • PR is not in draft mode (mark ready when checks pass)
  • Commit history is clean (squash fixups before review)

Live base is fc1cf596c1429f4c9ff7a99b90acd85d02cfdac2. Logical commits preserve independent attribution; no force push/history rewrite. Exact-head matching and live protections govern normal merge.

Build & Test

  • npm run build passes
  • npm test passes (all tests green)
  • npm run lint passes (type check clean)
  • npm run lint:eslint passes
  • For migration PRs (>20 files): include test output summary in PR description
Exact command Final-head result and scope
SKIP_BUILD_BUMP=1 npm run build Passed; versions unchanged.
npm run lint Passed.
npm run lint:eslint Passed; no lint errors.
npm run gh-aw:integrity:write Passed; generated manifest/resources synchronized.
npm run gh-aw:integrity:check Passed with pinned gh-aw v0.91.5.
npm test -- --run test/gh-aw-*.test.ts test/check-agent-binding.test.ts test/agent-provenance.test.ts test/recast-identity-neutrality.test.ts test/template-extra-classification.test.ts test/template-sync.test.ts Passed: 36 suites / 3321 tests.
npm run build -w packages/squad-sdk Independent Quality reviewer passed the documented prerequisite.
SQUAD_GH_AW_BIN=<absolute-gh-aw-v0.91.5-binary> npm test -- test/gh-aw-activation-finalization.test.ts test/agent-provenance.test.ts Independent Quality reviewer passed 2 files / 459 tests after the SDK build.
npm test Hosted final-head run passed 332 suites / 11,366 tests, 2 skipped and 47 todo.

Final CI run 38285719747 passed all nine jobs, including required gh-aw strict compile and test; isolation checks passed 443 tests before and after. Other returned repository checks succeeded; Scope Boundary intentionally skipped.

Compiler-dependent local commands use checksum-verified gh-aw v0.91.5 via PATH/SQUAD_GH_AW_BIN. Dependency manifests/lockfile unchanged. No additional standalone contract-export rerun is claimed for the final head: integrated fixtures already exercise actual native installation, strict compiled execution and the new end-to-end matrix.

The final matrix has 17 rows for activation and pending sources (34 actual-path cases), including genuine sparse [1] -> [1,3] -> [1,3,9] growth, ten verifier guard mutations, and no-create/map/hash assertions. Earlier retained regressions cover actual MCP serialization/sanitization and pinned create adapter, forged acceptance, authenticated legacy correspondence, malformed phases, complete formatted UTF-16 body boundaries, retry-safe prerequisites versus ambiguous creates, publication/readback, historical audit budgets and native ownership.

Final independent ancestry reviewer separately executed 30 end-to-end cases, ten isolated guard mutations and eight mapping/hash/topology groups. Verified built SDK emission, all 20 runtime-resource hashes and eight preserved compiled locks. That reviewer did not rerun installation/compilation/full CI; those are separately evidenced above. Actual hosted Copilot review 5494233472 completed on this exact head; COMMENTED alone is not treated as independent approval.

Changeset

  • Changeset added via npx changeset add (if packages/squad-sdk/src/ or packages/squad-cli/src/ changed)
  • Or direct CHANGELOG.md entry (maintainers only — write-protected for external contributors)
  • Or skip-changelog label applied (if no user-facing changes)

.changeset/activation-reconciliation.md uses the supported directly authored fragment alternative; generator not run. The unchecked entries are mutually exclusive alternatives, not missing changeset coverage.

Docs

  • README section updated (if new feature/module)
  • Docs feature page (if new user-facing capability)

Literal new README/feature-page additions are not claimed. Approved existing-guide substitutions are below. The guide provides public /casting usage, independent verifier responsibility, selected/undefined/error handling, recovery/phase/audit semantics, executable fixtures and SDK-build/pinned-tool instructions. Four new public interfaces have declaration JSDoc; category (c) is satisfied, not waived.

Exports

  • package.json subpath exports updated (if new module)

N/A: additions remain in the existing casting export; barrel updated, manifests unchanged.


Breaking Changes

Valid acceptance remains readable; malformed/unverified records reject. Activation requires stable IDs/frozen-plan fields rather than title inference or model-authored identity. Legacy promotion requires independent correspondence; missing evidence requires explicit current-state reconciliation. Later phases require validated prior evidence and ordered existing-phase growth. Reconciliation does not retroactively authenticate originals. Historical checker success does not certify run publication. The guide documents recovery and continuation; no existing public signature is removed.

Waivers

Final exact-head Lead and Quality approval record, under .github/PR_REQUIREMENTS.md:

  • Waived: category (d) separate SDK README feature section and new feature page under docs/src/content/docs/features/. Substitute the existing guide section Reading activation records with the SDK, reached through existing README/navigation links. No new page means conditional new-page navigation/docs-build-test additions do not trigger.
  • Waived: category (f) standalone sample project, separate sample README and sample-directory build/run form. Substitute actual executable fixtures test/gh-aw-activation-finalization.test.ts and test/agent-provenance.test.ts, the guide section Run the existing executable example, documented SDK build prerequisites and repository build/test evidence.

Reason: discoverable real producer/verifier/SDK regressions avoid a duplicate sample implementation. Approved at f558617be67e51dc0ef8b6223e739e5369ec5b07 by architect (Lead reviewer 608a9e2f-a904-495a-8854-00a97d1dcf10) and integration-e2e-tester (Quality reviewer c6abbe01-9613-483a-a85c-d5ac72c06de2), recorded by the coordinator from independent reports. Quality independently ran the documented build plus 459-test example. These are location/harness substitutions, not waived coverage. Public API JSDoc, runtime regressions, independent source/security review, hosted CI, protections and merge gates remain unwaived.

Add deterministic activation admission/finalization, explicit current-state no-create reconciliation, safe phase bridges and authenticated consumer selection. Preserve invalid source records and fail closed on ambiguous writes or ancestry.\n\nCloses #2203

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9370fe46-c2d1-486c-ab53-dc21c7f4d0fb
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🏗️ Architectural Review

Authoritative evidence: base-controlled pull_request_target reporter.

⚠️ Architectural review: 1 warning(s), 1 info.

Severity Category Finding Files
ℹ️ info template-sync Template files changed in .github/workflows/ but not in other template locations. If these templates should stay in sync, consider updating the others too. Changed: .github/workflows/, Unchanged: templates/, .squad-templates/, packages/squad-cli/templates/
🟡 warning sweeping-refactor This PR touches 41 files (41 modified/added, 0 deleted). Large PRs are harder to review — consider splitting if possible. —

Automated architectural review — informational only.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit f558617

PR Scope: 📦🔧 Mixed (product + infrastructure)

⚠️ 2 item(s) to address before review

Status Check Details
❌ Single commit 11 commits — consider squashing before review
✅ Not in draft Ready for review
✅ Branch up to date Up to date with dev
❌ Copilot review No Copilot review yet — it may still be processing
✅ Changeset present Changeset file found
✅ Scope clean No .squad/ or docs/proposals/ files
✅ No merge conflicts No merge conflicts
✅ Copilot threads resolved 4 active Copilot thread(s) resolved (7 outdated skipped)
✅ CI passing All checks passing

Files Changed (41 files, +10596 −4369)

File +/−
.changeset/activation-reconciliation.md +32 −0
.github/workflows/squad-agent-binding-check.yml +10 −18
.github/workflows/squad-ci.yml +2 −1
docs/src/content/docs/guide/gh-aw.md +333 −104
packages/squad-sdk/src/casting/agent-provenance.ts +572 −16
packages/squad-sdk/src/casting/index.ts +6 −0
scripts/check-agent-binding.mjs +2 −759
scripts/gh-aw-hosted-e2e.mjs +4 −4
test/agent-provenance.test.ts +987 −1
test/gh-aw-activate-fast-path-label-provisioning.test.ts +232 −357
test/gh-aw-activation-artifact-integrity.test.ts +167 −167
test/gh-aw-activation-capacity.test.ts +192 −433
test/gh-aw-activation-finalization.test.ts +2456 −0
test/gh-aw-activation-label-provisioning.test.ts +347 −266
test/gh-aw-activation-summary-outcomes.test.ts +380 −357
test/gh-aw-activation-temporary-ids.test.ts +113 −281
test/gh-aw-agent-binding-correspondence.test.ts +151 −176
test/gh-aw-command-authorization.test.ts +190 −1
test/gh-aw-hosted-e2e.test.ts +1 −1
test/gh-aw-implement-workflow.test.ts +1 −1
test/gh-aw-lifecycle-upsert.test.ts +16 −14
test/gh-aw-plan-lifecycle.test.ts +310 −94
test/gh-aw-quality.test.ts +405 −139
test/helpers/gh-aw-diagnostic-runtime.ts +1 −0
test/recast-identity-neutrality.test.ts +20 −20
workflows/aw.yml +6 −0
workflows/package/squad-bootstrap.md +1 −1
workflows/package/squad-deps-worker.md +7 −6
workflows/package/squad-implement-worker.md +7 −6
workflows/package/squad-retro.md +7 −6
workflows/package/squad.md +314 −549
workflows/shared/check-agent-binding.mjs +1319 −0
workflows/shared/squad-activation.mjs +1523 −0
workflows/shared/squad-agent-binding-check.yml +42 −0
workflows/shared/squad-command-contract.mjs +65 −15
workflows/shared/squad-install-verifier.mjs +8 −1
workflows/shared/squad-planning-ontology.md +42 −19
workflows/shared/squad.md +7 −5
workflows/squad-bootstrap.md +1 −1
workflows/squad-workflows.manifest.json +53 −29
workflows/squad.md +264 −521

Total: +10596 −4369


This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🟠 Impact Analysis — PR #2204

Risk tier: 🟠 HIGH

📊 Summary

Metric Count
Files changed 41
Files added 5
Files modified 36
Files deleted 0
Modules touched 6
Critical files 1

🎯 Risk Factors

  • 41 files changed (21-50 → HIGH)
  • 6 modules touched (5-8 → HIGH)
  • Critical files touched: packages/squad-sdk/src/casting/index.ts

📦 Modules Affected

ci-workflows (2 files)
  • .github/workflows/squad-agent-binding-check.yml
  • .github/workflows/squad-ci.yml
docs (1 file)
  • docs/src/content/docs/guide/gh-aw.md
root (17 files)
  • .changeset/activation-reconciliation.md
  • workflows/aw.yml
  • workflows/package/squad-bootstrap.md
  • workflows/package/squad-deps-worker.md
  • workflows/package/squad-implement-worker.md
  • workflows/package/squad-retro.md
  • workflows/package/squad.md
  • workflows/shared/check-agent-binding.mjs
  • workflows/shared/squad-activation.mjs
  • workflows/shared/squad-agent-binding-check.yml
  • workflows/shared/squad-command-contract.mjs
  • workflows/shared/squad-install-verifier.mjs
  • workflows/shared/squad-planning-ontology.md
  • workflows/shared/squad.md
  • workflows/squad-bootstrap.md
  • workflows/squad-workflows.manifest.json
  • workflows/squad.md
scripts (2 files)
  • scripts/check-agent-binding.mjs
  • scripts/gh-aw-hosted-e2e.mjs
squad-sdk (2 files)
  • packages/squad-sdk/src/casting/agent-provenance.ts
  • packages/squad-sdk/src/casting/index.ts
tests (17 files)
  • test/agent-provenance.test.ts
  • test/gh-aw-activate-fast-path-label-provisioning.test.ts
  • test/gh-aw-activation-artifact-integrity.test.ts
  • test/gh-aw-activation-capacity.test.ts
  • test/gh-aw-activation-finalization.test.ts
  • test/gh-aw-activation-label-provisioning.test.ts
  • test/gh-aw-activation-summary-outcomes.test.ts
  • test/gh-aw-activation-temporary-ids.test.ts
  • test/gh-aw-agent-binding-correspondence.test.ts
  • test/gh-aw-command-authorization.test.ts
  • test/gh-aw-hosted-e2e.test.ts
  • test/gh-aw-implement-workflow.test.ts
  • test/gh-aw-lifecycle-upsert.test.ts
  • test/gh-aw-plan-lifecycle.test.ts
  • test/gh-aw-quality.test.ts
  • test/helpers/gh-aw-diagnostic-runtime.ts
  • test/recast-identity-neutrality.test.ts

⚠️ Critical Files

  • packages/squad-sdk/src/casting/index.ts

This report is generated automatically for every PR. See #733 for details.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Pre-create failures can permanently strand activation, oversized accepted plans can exceed GitHub’s body limit, and the SDK accepts malformed legacy phase scopes.

3 open findings
What changed in this PR

Implements #2203’s deterministic activation finalizer, no-create reconciliation, checker integration, and SDK record selection.

Changes:

  • Adds trusted issue creation/finalization and reconciliation runtimes.
  • Packages binding validation and enforces trusted-writer ownership.
  • Adds SDK APIs, documentation, changeset, and regression coverage.
File Description
.changeset/​activation-reconciliation.md Records SDK patch changes.
.github/​workflows/​squad-agent-binding-check.yml Collects reconciliation records.
.github/​workflows/​squad-ci.yml Updates runtime resource count.
docs/​src/​content/​docs/​guide/​gh-aw.md Documents activation and recovery.
packages/​squad-sdk/​src/​casting/​agent-provenance.ts Adds activation selection API.
packages/​squad-sdk/​src/​casting/​index.ts Exports selection types and API.
scripts/​check-agent-binding.mjs Delegates to packaged checker.
scripts/​gh-aw-hosted-e2e.mjs Updates hosted topology checks.
test/​agent-provenance.test.ts Tests SDK/checker selection parity.
test/​gh-aw-activate-fast-path-label-provisioning.test.ts Tests fast-path bindings.
test/​gh-aw-activation-artifact-integrity.test.ts Tests trusted artifact production.
test/​gh-aw-activation-capacity.test.ts Tests activation limits and receipts.
test/​gh-aw-activation-finalization.test.ts Tests finalization and reconciliation.
test/​gh-aw-activation-label-provisioning.test.ts Tests live label provisioning.
test/​gh-aw-activation-summary-outcomes.test.ts Tests verified summary outcomes.
test/​gh-aw-activation-temporary-ids.test.ts Tests actual-ID receipt handling.
test/​gh-aw-agent-binding-correspondence.test.ts Tests task/agent correspondence.
test/​gh-aw-command-authorization.test.ts Tests compiled authorization boundary.
test/​gh-aw-hosted-e2e.test.ts Updates hosted runtime count.
test/​gh-aw-lifecycle-upsert.test.ts Rejects model-authored terminal lifecycle.
test/​gh-aw-plan-lifecycle.test.ts Tests trusted lifecycle transitions.
test/​gh-aw-quality.test.ts Expands workflow contract coverage.
test/​helpers/​gh-aw-diagnostic-runtime.ts Resolves supplied diagnostic modules.
workflows/​aw.yml Packages new runtime resources.
workflows/​package/​squad-bootstrap.md Updates generated verifier digest.
workflows/​package/​squad-deps-worker.md Updates generated activation guards.
workflows/​package/​squad-implement-worker.md Updates generated activation guards.
workflows/​package/​squad-retro.md Updates generated activation guards.
workflows/​package/​squad.md Packages the generated activation workflow.
workflows/​shared/​check-agent-binding.mjs Implements packaged binding verification.
workflows/​shared/​squad-activation.mjs Implements trusted activation and recovery.
workflows/​shared/​squad-agent-binding-check.yml Adds installed post-run checker.
workflows/​shared/​squad-command-contract.mjs Adds reconciliation command enforcement.
workflows/​shared/​squad-install-verifier.mjs Registers three runtime resources.
workflows/​shared/​squad-planning-ontology.md Defines reconciliation and immutable chains.
workflows/​shared/​squad.md Restricts activation to the finalizer.
workflows/​squad-bootstrap.md Updates verifier digest.
workflows/​squad-workflows.manifest.json Updates package hashes and topology.
workflows/​squad.md Adds trusted activation workflow jobs.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread workflows/shared/squad-activation.mjs Resolved
Comment thread workflows/shared/squad-activation.mjs Resolved
bradygaster and others added 2 commits October 11, 2026 20:04
Revision independently authored by github-integration-dev under reviewer lockout. Address legacy promotion authority, full-body acceptance forgery, phase-scope parity, rendered body bounds, and retry-safe prerequisites. Original author performed only validation and mechanical integration.

Closes #2203

Revision-Author: github-integration-dev
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9370fe46-c2d1-486c-ab53-dc21c7f4d0fb
Stage native YAML through the supported .github/aw package destination and materialize its verified workflow without overwriting unrelated content. Exercise the actual installer and preserve canonical label/isolation gates. Keep topology at nineteen shared resources plus one native checker.

Closes #2203

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9370fe46-c2d1-486c-ab53-dc21c7f4d0fb

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Run-to-output correlation and multi-phase selection have unresolved correctness defects.

2 open findings
3 resolved since last review
Previously missed (3)

In code that hasn't changed since last review

Medium severity Ignore unclassified comments when validating chain consumption

packages/​squad-sdk/​src/​casting/​agent-provenance.ts:927

In chain mode this compares consumed activation/source records with every caller-supplied record. A normal discussion comment is ignored in single-record mode but makes an otherwise valid multi-phase chain fail as “unconsumed history.” Count only classified activation/pending history records here, while continuing to reject unconsumed activation candidates.

Medium severity Compare chain consumption against classified history records

workflows/​shared/​check-agent-binding.mjs:919

This chain-consumption check counts unrelated input comments even though the selector's classification intentionally skips them. Consequently adding a discussion-only record breaks a valid multi-phase selection, unlike the single-pair path. Compare against the classified activation/pending history set rather than raw records.length.

Low severity Reconcile approved path count with the actual 41-file diff

workflows/​squad-workflows.manifest.json:139

The PR description says this ships “exactly the approved 39 paths,” but the current PR changes 41 files. Please reconcile the stated scope/count with the actual diff so reviewers can verify that no unapproved paths were added.

🧠 Review effort: Balanced

@bradygaster

Copy link
Copy Markdown
Collaborator Author

Collector feasibility update for unchanged head cfb2e9649e3858c1acd88917bed9e12895edc97b:

The independent architect completed the authorized read-only deployed-capability assessment. All eight probes of the documented step-specific log endpoint returned HTTP 404, including known successful pinned upload steps and adjacent/index-offset candidates. Same-access exact-attempt job metadata, artifact metadata and a whole-job log returned HTTP 200. This establishes that the step-specific route was unusable with the tested access; it does not distinguish unsupported deployment from endpoint-specific access or data behavior.

The public artifact API does not expose the uploader job/attempt join. Matching artifact ID/digest text in whole-job logs is not a replacement for server-attributed trusted-step evidence. Existing candidate run 38198933531 is Squad CI, has no relevant receipt artifacts, and is not a native activation/reconciliation execution.

A separate source-authority decision remains: native workflow_dispatch currently permits an authorized branch/tag selection, so a default-only or revision allowlist would be an explicit behavior/policy change, not a silent repair. No such change has been made.

Both collector findings remain unresolved. No workflow/source/permission changes, new fixtures, dispatches or additional reruns were performed by this assessment. The passing same-head CI retry remains recorded separately and is not security or collector clearance. This PR remains draft and blocked pending a supported provenance architecture and authorized implementation followed by independent exact-head review.

Independently authored by architect670b57f4 under reviewer lockout; original owner performed mechanical package generation and validation only.

Closes #2203

Revision-Author: architect (670b57f4-0ee3-4c01-b347-5b798cb4ef14)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9370fe46-c2d1-486c-ab53-dc21c7f4d0fb

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Multi-node SDK and checker selection incorrectly rejects valid histories containing unrelated records.

2 open findings
2 resolved since last review

🧠 Review effort: Balanced

Independent docs-devrel revision adds public casting usage, executable fixture instructions and four declaration JSDoc comments only. Closes #2203

Revision-Author: docs-devrel (42cb5949-3981-4e7a-a012-70862d711675)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9370fe46-c2d1-486c-ab53-dc21c7f4d0fb
@bradygaster

Copy link
Copy Markdown
Collaborator Author

Independent documentation/sample dispositions for exact head 4438fe716b290842f04b7a8d78bf9e44a623ad84, recorded by the source coordinator from reviewer reports:

  • Lead: APPROVE, architect reviewer 608a9e2f-a904-495a-8854-00a97d1dcf10.
  • Quality: APPROVE, integration-e2e-tester reviewer c6abbe01-9613-483a-a85c-d5ac72c06de2.

Under .github/PR_REQUIREMENTS.md, both roles approve only these explicit substitutions:

  1. Category (d): the existing gh-aw guide section Reading activation records with the SDK, reached through existing README/navigation links, replaces a separate SDK README feature section and a new feature page under docs/src/content/docs/features/. No new page is added, so conditional new-page navigation/docs-build-test additions do not trigger.
  2. Category (f): actual executable fixtures in test/gh-aw-activation-finalization.test.ts and test/agent-provenance.test.ts, the guide instructions Run the existing executable example, and repository build/test evidence replace a standalone sample project, separate sample README, and sample-directory build/run form.

These are location/harness substitutions, not omitted coverage. The guide names the public /casting API, independent verifier-evidence boundary, selected/undefined/error handling, real producer/verifier/SDK fixture, pinned gh-aw v0.91.5 prerequisites and runner. Quality independently executed the documented SQUAD_GH_AW_BIN=<absolute-gh-aw-v0.91.5-binary> npm test -- test/gh-aw-activation-finalization.test.ts test/agent-provenance.test.ts: 364 tests passed across 2 files. Both reviewers confirmed the four new public interfaces now have declaration JSDoc; category (c) is satisfied, not waived.

The earlier documentation/sample rejections at 5142706f are cleared for this exact scope. This is not overall PR approval, security clearance or permission to bypass required checks. Runtime regressions, independent source/generated review, changeset, hosted CI, branch protections and normal merge gates remain unwaived.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Phase-scope widening, code-block parsing, contradictory recovery guidance, and unresolved chain-selection defects remain.

4 open findings
Previously missed (1)

In code that hasn't changed since last review

Low severity Update troubleshooting guidance to prevent duplicate activation recovery

docs/​src/​content/​docs/​guide/​gh-aw.md:1866

This no-retry rule conflicts with the existing troubleshooting guidance at lines 852 and 2570-2577, which still tells operators to rerun activation, resume by title, and rely on the old 75/110 caps and report_incomplete behavior. Following those instructions after an ambiguous create can cause the duplicate recovery this section prohibits; update those sections to direct users to explicit current-state reconciliation and the current limits.

🧠 Review effort: Balanced

Comment thread workflows/shared/squad-activation.mjs Resolved
Comment thread workflows/shared/squad-activation.mjs Resolved
bradygaster and others added 2 commits October 12, 2026 09:28
Use the existing canonical pinning helper before compiling; preserve the exact immutable SHA assertion. Separate mechanical fixture correction for Closes #2203.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9370fe46-c2d1-486c-ab53-dc21c7f4d0fb
Independent state-storage-dev correction of code-block task parsing, scoped reconciliation, ordinary-discussion parity, complete attributed UTF-16 body limits and recovery guidance. Generated package metadata refreshed mechanically. Closes #2203.

Revision-Author: state-storage-dev (e617e959-be96-44dd-915b-d015eac1da78)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9370fe46-c2d1-486c-ab53-dc21c7f4d0fb
Document the SDK build prerequisite for both supported compiler paths. Independently revised and exercised by docs-devrel against freshly generated public casting exports. Closes #2203.

Revision-Author: docs-devrel (42cb5949-3981-4e7a-a012-70862d711675)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9370fe46-c2d1-486c-ab53-dc21c7f4d0fb
@bradygaster

Copy link
Copy Markdown
Collaborator Author

Independent documentation/sample dispositions for exact head d97b1e6ae73ee7c3608f96660c232df5fb7c8b1b, recorded by the source coordinator from renewed reviewer reports:

  • Lead: APPROVE, architect reviewer 608a9e2f-a904-495a-8854-00a97d1dcf10.
  • Quality: APPROVE, integration-e2e-tester reviewer c6abbe01-9613-483a-a85c-d5ac72c06de2.

Under .github/PR_REQUIREMENTS.md, both roles approve only these explicit substitutions:

  1. Category (d): the existing gh-aw guide section Reading activation records with the SDK, reached through existing README/navigation links, replaces a separate SDK README feature section and a new feature page under docs/src/content/docs/features/. No new page is added, so conditional new-page navigation/docs-build-test additions do not trigger.
  2. Category (f): actual executable fixtures in test/gh-aw-activation-finalization.test.ts and test/agent-provenance.test.ts, the guide instructions Run the existing executable example, and repository build/test evidence replace a standalone sample project, separate sample README, and sample-directory build/run form.

These are location/harness substitutions, not omitted coverage. The guide names the public /casting API, independent verifier-evidence boundary, selected/undefined/error handling, real producer/verifier/SDK fixture, pinned gh-aw v0.91.5 prerequisites and runner. The final correction explicitly requires npm run build -w packages/squad-sdk before BOTH normal and alternate-binary runners. Quality independently executed that build, then SQUAD_GH_AW_BIN=<absolute-gh-aw-v0.91.5-binary> npm test -- test/gh-aw-activation-finalization.test.ts test/agent-provenance.test.ts: build passed; 407 tests passed across 2 files. Four new public interfaces retain declaration JSDoc; category (c) is satisfied, not waived.

The earlier discoverability and missing-build-prerequisite findings are cleared for this exact scope and head. This is not overall PR approval, security clearance or permission to bypass required checks. Runtime regressions, independent source/generated review, changeset, hosted CI, branch protections and normal merge gates remain unwaived.

@bradygaster

Copy link
Copy Markdown
Collaborator Author

Independent security approval

Reviewer: security-review agent 452066a4-25d5-4a5d-9d5b-82d9d81ed6f1.
Final immutable candidate: d97b1e6ae73ee7c3608f96660c232df5fb7c8b1b.
Verdict: APPROVE. Coordinator-preserved receipt from the independent reviewer.

The reviewer approved runtime candidate da46d7ccaea9440600e6377bd7bf4406512ff486 after 43 focused independent probes, then independently verified the complete guide-only delta to d97b1e6. No runtime, generated, package or security-policy changes occurred in that final delta. Probes were not redundantly rerun for the documentation-only commit.

Cleared findings and regression evidence

  • Seven code-example styles underwent two pinned sanitizer passes and source plus emitted compiled-job execution. Examples contributed no phases/tasks; legitimate tasks were created and finalized.
  • Seven source/request phase combinations ran through source/compiled reconciliation. Whole-plan omitted/empty scopes succeed; neither widens a scoped source; exact matches succeed; mismatches reject without mutation.
  • SDK and canonical checker accept ordinary discussion mixed with valid pair/chain history while rejecting malformed authority, extra activation candidates, malformed pending records, duplicate identities and missing proof.
  • Actual pinned compiled issue creation accepts complete outgoing bodies of 65,535 and 65,536 UTF-16 units; 65,537 rejects before any mutation for ASCII and supplementary Unicode. Missing formatter rejects before mutation.
  • Ambiguous creates retain no-create protection; missing publication responses remain failures. Shared Markdown extraction preserves command exclusions and dispatch recognition.
  • Corrected recovery guidance and generated parity inspected: eight workflow-source digests, eight normalized compiled locks/action pins, twenty runtime digests, installed-manifest equality and activation-job parity.
  • Critical runtime bytes were independently compared to immutable public pin 16b430146d5d5646eccef5a1ceb72152333b18b9.

Limits

The reviewer reused previously reviewed baseline evidence and focused on revision/regression deltas. It did not independently rerun the full suite, fresh strict compilation, actual native installer/materialization, or hosted end-to-end execution. Those execution gates remain separately attributed to integration/hosted evidence. No static suite totals were substituted for this security verdict.

No GitHub or repository mutations were performed by the reviewer. Coordinator owns final exact-head CI, hosted review, documentation/sample disposition and normal merge qualification.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The historical checker performs an unbounded repository-wide API audit after every Squad completion, which will eventually exhaust rate limits.

0 open findings

4 resolved since last review
Previously missed (2)

In code that hasn't changed since last review

Medium severity Unbounded audit scan exhausts API budget after every completion

.github/​workflows/​squad-agent-binding-check.yml:36

This now performs an unbounded repository-wide comment scan after every Squad/Squad CI completion. The checker then makes additional API reads for each historical record and each referenced issue, so repositories with a few hundred activations can exhaust the 5,000-request token budget and make every subsequent audit fail. Keep full-history audits scheduled/manual, or pass a bounded candidate-origin set from the triggering run and API-verify the complete chain only for those origins.

Medium severity Consumer runs scan all history and exceed the API budget

workflows/​shared/​squad-agent-binding-check.yml:35

The installed checker has the same unbounded scan: every consumer Squad run paginates all repository comments and then re-reads issues and ancestry for every historical activation. This eventually exceeds the workflow token's API budget and turns unrelated Squad runs red. Scope per-run audits to bounded candidate origins (while API-verifying their full chains), and move repository-wide history audits to a scheduled/manual workflow.

🧠 Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The security-sensitive 41-file workflow and SDK migration still awaits exact-head hosted CI and independent security qualification.

0 open findings

🧠 Review effort: Balanced

Retain automatic audits with bounded historical-origin discovery and a shared API budget. Preserve complete-chain validation and explicit incomplete outcomes; keep manual full-history audits available. Independently implemented by state-storage-dev, with mechanically refreshed package integrity metadata. Closes #2203.

Revision-Author: state-storage-dev (e617e959-be96-44dd-915b-d015eac1da78)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9370fe46-c2d1-486c-ab53-dc21c7f4d0fb

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The SDK and canonical checker currently allow reconciliation to widen an activation source’s phase scope.

2 open findings

🧠 Review effort: Balanced

Require source activation phase scope to match verified evidence in both SDK and canonical checker. Add built-SDK parity and defensive mismatch regressions without changing public APIs or trusted writer behavior. Closes #2203.

Revision-Author: typescript-api-contract-designer (c2726384-189e-4dfe-a10f-f466007b4852)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9370fe46-c2d1-486c-ab53-dc21c7f4d0fb
@bradygaster

Copy link
Copy Markdown
Collaborator Author

Independent final-head review dispositions

Candidate: c2b3cc9867f57f2dac0a91653cbd8005e11d4aa5.
These decisions are recorded by the source coordinator from independent reviewer reports; they do not replace hosted checks or branch protection.

Security and contract review: APPROVE, reviewer 452066a4-25d5-4a5d-9d5b-82d9d81ed6f1.

The final paired consumer-scope correction passed ten focused scenario groups using the actual built SDK public export, exact-source SDK and canonical selector. Source [1] rejects replacement/evidence [1,2], [] and [2], including fabricated evidence. Matched phase, whole-plan explicit/omitted evidence, pending recovery, complete two-phase chains and ordinary discussion remain accepted. Extra/malformed activation authority rejects. The reviewer classified the former consumer gap as LOW defensive consistency: the actual trusted producer/verifier already rejected widening, so HIGH authorization impact was not demonstrated.

The reviewer independently inspected the final six-file delta and bound built SDK JavaScript to exact source (excluding only source-map directive). It verified 20 source/installed runtime-resource digests, exported manifest, eight workflow-source hashes and eight normalized compiled locks with immutable pin checks. Writer authority, permissions, ownership and revision policy are unchanged.

Prior independent revision evidence remains valid for unchanged code: 43 focused probes cleared parser, scope, ordinary-history, complete outgoing-body attribution/UTF-16 limits and ambiguity protection; 19 probes cleared bounded historical audit behavior, including the shared 250-request ceiling across discovery and canonical verification, pagination/truncation failures, both actual YAML scripts and manual full-audit behavior. Discovery hints never establish current-run attribution.

Limits: these reviews used synthetic API/virtual-filesystem probes and hash-qualified built/exported artifacts. The reviewer did not independently execute a fresh build, installer/materializer, compiler, hosted run or full suite. Integration and hosted evidence cover those separate gates; suite totals were not substituted for review.

Lead documentation/sample substitutions: APPROVE, architect reviewer 608a9e2f-a904-495a-8854-00a97d1dcf10.

Quality documentation/sample substitutions: APPROVE, integration-e2e-tester reviewer c6abbe01-9613-483a-a85c-d5ac72c06de2.

Both approvals apply to the exact candidate and only these substitutions under .github/PR_REQUIREMENTS.md:

  1. Category (d): existing gh-aw guide/public casting example and README/navigation links replace a separate SDK README feature section and new feature page. Conditional new-page navigation/tests do not trigger.
  2. Category (f): named production-path executable fixtures, guide prerequisites/build/test/results handling and repository validation replace a standalone sample project, separate sample README and sample-directory build/run form.

Quality independently ran npm run build -w packages/squad-sdk, then SQUAD_GH_AW_BIN=<absolute-gh-aw-v0.91.5-binary> npm test -- test/gh-aw-activation-finalization.test.ts test/agent-provenance.test.ts: build passed; 423 tests passed across two files. Public API/JSDoc, signatures, current-build prerequisite and guide contract remain intact. Category (c) is satisfied, not waived.

No runtime coverage, independent review, full CI, changeset, permissions, protection or merge gate is waived.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The SDK and canonical checker accept non-prefix phase ancestry that the trusted producer rejects.

0 open findings

2 resolved since last review
Previously missed (2)

In code that hasn't changed since last review

Medium severity Reject non-prefix ancestry in public phase selector

packages/​squad-sdk/​src/​casting/​agent-provenance.ts:983

The chain accepts non-prefix ancestry because it only checks set inclusion. For example, independently evidenced scopes [2] → [1, 2] pass here, although the producer verifier requires prior phases to occupy the same leading positions (squad-activation.mjs:1376-1378). This lets the public selector recognize a phase history that the trusted workflow explicitly rejects; compare phases by index so ancestry is an exact expanding prefix.

Medium severity Enforce exact prefix ancestry in canonical checker

workflows/​shared/​check-agent-binding.mjs:968

This canonical checker has the same set-inclusion gap as the SDK selector: [2] → [1, 2] is treated as expanding ancestry even though the trusted request verifier requires the predecessor scope to be an exact prefix (squad-activation.mjs:1376-1378). Enforce positional prefix equality here so checker and producer contracts cannot diverge.

🧠 Review effort: Balanced

Require positional-prefix ancestry and reject whole-plan predecessor expansion and nonexistent selected phases. Exercise real producer/verifier/built SDK/packaged checker contracts across a bounded matrix, retaining sparse phases and no-create recovery. Closes #2203.

Revision-Author: sdk-runtime-dev (d6968b87-1bf1-4aac-b06c-e0479ef763a3)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9370fe46-c2d1-486c-ab53-dc21c7f4d0fb

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The large security-sensitive workflow change still has a command parsing defect and awaits exact-head CI and security qualification.

0 open findings

Previously missed (1)

In code that hasn't changed since last review

Medium severity Match squad command words case-insensitively

workflows/​shared/​squad-command-contract.mjs:182

This new command is the only argument classifier that matches normalized case-sensitively; all existing commands classify through lowered. As a result, /squad Activate is accepted but /squad Reconcile Activation … is rejected. Match the command words case-insensitively while retaining the lowercase-only SHA requirement.

🧠 Review effort: Balanced

@bradygaster

Copy link
Copy Markdown
Collaborator Author

Final independent disposition

Reviewed head: f558617be67e51dc0ef8b6223e739e5369ec5b07.
Reviewed tree: 5536d8ed87bb726f937e949f3686b669caaec555.

Security and recovery correctness

Independent reviewer activation-final-security APPROVES the consolidated ancestry delta from c2b3cc9. All three conditions behind the previous request for changes are cleared: non-prefix insertion, whole-plan predecessor expansion, and nonexistent selected phases.

# Severity File Lines Vulnerability Confidence
- - - - No outstanding vulnerability found in the scoped final review -

The reviewer independently executed 30 end-to-end activation/pending cases, 10 isolated guard-mutation controls, and 8 mapping/hash/topology regression groups through the actual built SDK public export, exact-source producer/verifier, and canonical package-source selector/CLI. Valid ordered and sparse growth, standalone whole-plan recovery, ordinary discussion, dependency closure, and no-create reconciliation remain supported. Changed mappings, broken ancestry, and competing histories reject.

The reviewer inspected the entire seven-file delta, compared built SDK JavaScript with exact-source emission, and checked 20 runtime-resource hashes, workflow/skill hashes, unchanged ownership/revision policy, and eight preserved compiled locks against the final manifest/runtime pins.

Limits: no fresh installer, compiler, hosted execution, or full-suite rerun by this reviewer; probes used virtual APIs/filesystem mutations. This explicit final-delta approval carries forward the previously recorded independent source/security and bounded-audit dispositions. Hosted totals were not used as substitute clearance.

Lead and Quality documentation/sample approvals

Both independent role reviewers APPROVE at the exact head:

  • architect, Lead (608a9e2f-a904-495a-8854-00a97d1dcf10): unchanged public signatures/JSDoc, consumer guide, fresh-SDK-build prerequisite, ordered/full/scoped guidance, changeset, and linked ancestry matrix remain adequate.
  • integration-e2e-tester, Quality (c6abbe01-9613-483a-a85c-d5ac72c06de2): independently inspected the delta and documented journey, then ran npm run build -w packages/squad-sdk followed by SQUAD_GH_AW_BIN=<absolute-gh-aw-v0.91.5-binary> npm test -- test/gh-aw-activation-finalization.test.ts test/agent-provenance.test.ts: build passed; 2 files / 459 tests passed.

Approved substitutions under .github/PR_REQUIREMENTS.md:

  • (d) Existing guide/public /casting usage with existing README/navigation links instead of a separate README feature section and new feature page.
  • (f) Named executable repository fixtures plus documented prerequisites, SDK build, test commands and result handling instead of a standalone sample project, sample README and sample-directory build/run.

Category (c) public API JSDoc is satisfied, not waived. Coverage, security, CI, runtime behavior and merge protections are not waived. Reports are recorded here by the coordinator, not represented as GitHub-native reviewer approvals.

Hosted review and CI

  • Exact-head CI run 38285719747 succeeded: all nine jobs; 332 suites / 11,366 tests passed, 2 skipped, 47 todo; isolation 443 tests before and after.
  • Required strict compile and test succeeded.
  • Actual hosted Copilot review 5494233472 completed on the exact head. All 11 inline review threads are resolved.
  • The final overview's command-keyword casing observation is deferred to Normalize reconciliation command keyword casing without relaxing SHA validation #2205. The actual classifier accepts documented lowercase recovery, explicitly rejects mixed-case reconciliation keywords and uppercase hashes, and does not authorize a partial operation. Independent security review agrees it is not a security blocker. This is a bounded usability follow-up, not a waived acceptance/recovery defect.

Landing disposition

No outstanding acceptance/recovery blocker. Final live read confirms head above, base fc1cf596c1429f4c9ff7a99b90acd85d02cfdac2, 41 paths with no deletions, CLEAN merge state, all returned checks successful or intentionally skipped, required up-to-date compile/test gates satisfied, and zero required GitHub approval count. Normal merge only, with exact-head matching; no bypass, auto-merge, permission expansion, deployment, or consumer adoption.

@bradygaster
bradygaster marked this pull request as ready for review October 12, 2026 18:12
@bradygaster
bradygaster merged commit aa81f08 into dev Oct 12, 2026
30 checks passed
@bradygaster

Copy link
Copy Markdown
Collaborator Author

Verified normal merge: aa81f08. The fetched merge tree exactly matches reviewed head f558617 (tree 5536d8ed87bb726f937e949f3686b669caaec555; zero diff). Ready-for-review automatically reran CI: https://github.com/bradygaster/squad/actions/runs/38289441705 succeeded, including required compile and test, before exact-head-matched merge. Final independent approvals: https://github.com/bradygaster/squad/pull/2204#issuecomment-6129949056. No bypass or auto-merge used; no deployment/adoption performed. Worktrees and evidence retained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate activation finalization and explicit no-create reconciliation

2 participants