Skip to content

Fix connector safe-output metadata causing unknown argument failures - #76981

Merged
pelikhan merged 5 commits into
mainfrom
pelikhan/connector-health
Nov 12, 2026
Merged

pelikhan merged 5 commits into
mainfrom
pelikhan/connector-health

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

The live smoke-issues run failed both Linear and Jira creation with Unknown connector argument. Generated handlers forwarded safe-output message IDs and dependency metadata into the connector's strict input validator.

Strip only the protocol fields (type, output_id, depends-on, and depends_on) at the generated handler boundary. Preserve declared inputs such as temporary_id, strict rejection of undeclared arguments, and dependency scheduling in the handler manager.

Store one compact, plain-JSON plan per connector in the safe-output job's YAML env mapping. Generated JavaScript reads its compiler-owned environment variable and forwards only that plan as GH_AW_CONNECTOR_PLAN to the runtime. No base64 or inline executable plan data. Endpoints, capability selections, grants, and secret names remain visible in the lock. Preserve expression safety, digest verification, exact numeric tokens, byte limits, and legacy snapshot compatibility. Missing plan variables and user-defined collisions fail explicitly.

Validation

  • Regression tests reproduce the original failure through all five compiled smoke-issues handlers and pass after the fix.
  • Added environment-delivery, no-inline-plan, missing-variable, collision, JSON round-trip, Go/Node parity, expression safety, tamper detection, and UTF-8 byte-bound coverage.
  • CI-equivalent offline connector conformance and connector runtime race tests passed.
  • make agent-report-progress passed, including build, lint, impacted tests, and drift validation across 365 workflows.
  • The patched workflow has not been dispatched live.

pelikhan and others added 2 commits November 11, 2026 14:23
Strip orchestration metadata before strict connector validation. Reproduce the smoke-issues failure through all five generated handlers and cover live and staged execution without relaxing undeclared-input rejection.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace generated base64 plan payloads with indented JSON, escaping Actions expression openers and JavaScript template delimiters. Preserve digest verification, exact numeric tokens, byte limits, and legacy snapshot compatibility.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review November 11, 2026 23:34
Copilot AI adaptive review requested due to automatic review settings November 11, 2026 23:34
pelikhan and others added 2 commits November 11, 2026 15:41
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Store one compact plain-JSON plan per connector in the safe-output job environment. Generated JavaScript reads its compiler-owned variable rather than embedding plan data. Keep credential-free staging, per-runtime environment isolation, and explicit missing-plan and collision checks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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

GraphQL variables are incorrectly rewritten as environment references, causing connector startup digest failures, while the Zendesk staging test still expects base64 rather than newline-stripped JSON.

2 open issues
What changed in this PR

This PR fixes connector safe-output delivery in gh-aw by separating message metadata from operation inputs. It also makes compiled connector plans easier to inspect in workflow locks.

Changes:

  • Filter protocol metadata while preserving declared inputs and strict argument validation.
  • Emit readable JSON plans with digest verification and legacy base64 compatibility.
  • Add regression coverage, update contracts, and regenerate the smoke-issues lock.
File Description
pkg/​workflow/​connector_content_host_test.go Tests metadata filtering and generated JSON safety.
pkg/​workflow/​compiler_connectors.go Filters message metadata and emits readable plans.
pkg/​connectors/​runtime_node_parity_test.go Checks Go/Node compatibility for both snapshot formats.
pkg/​connectors/​CONTRACT.md Updates the snapshot serialization contract.
pkg/​connectors/​compiled.go Adds JSON encoding and backward-compatible decoding.
pkg/​connectors/​compiled_test.go Tests readable snapshots and byte limits.
docs/​src/​content/​docs/​specs/​connector-specification.md Specifies JSON formatting, escaping, and size limits.
docs/​src/​content/​docs/​reference/​connectors.md Documents plan formats and metadata handling.
actions/​setup/​js/​connector_runtime.test.cjs Tests digest normalization, tampering, and UTF-8 bounds.
actions/​setup/​js/​connector_runtime.cjs Decodes JSON plans and normalizes digest inputs.
.github/​workflows/​smoke-issues.lock.yml Regenerates all five connector handlers.
.changeset/​patch-connector-message-metadata.md Records the fixes for release notes.

Review effort: Max (auto)

Comment thread pkg/connectors/compiled.go Resolved
Comment thread pkg/workflow/compiler_connectors.go Resolved
Escape all dollar signs as JSON Unicode sequences before MCP configuration rendering so shell and gateway environment substitution cannot corrupt frozen plan queries or digests. Add rendered Linear MCP regression coverage and retain the already-correct Zendesk credential-free staging assertion.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan merged commit 9ca6463 into main Nov 12, 2026
87 checks passed
@pelikhan
pelikhan deleted the pelikhan/connector-health branch November 12, 2026 00:14
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.3

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.

2 participants