Skip to content

Support repository-relative imports and staged connector dry-runs - #76933

Merged
pelikhan merged 4 commits into
mainfrom
pelikhan/smoke-linear-investigation
Nov 11, 2026
Merged

pelikhan merged 4 commits into
mainfrom
pelikhan/smoke-linear-investigation

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

smoke-issues fails during activation because lock verification resolves repository-relative connector imports beneath .github/workflows a second time. Diagnostic compilation also rejects compiler-generated connector handlers as authored host scripts.

Changes

  • Share native imports base selection, section parsing and lexical containment with Go hash resolution; mirror those rules in JavaScript. Reuse imports' directory traversal rather than special-case checkout names, so repositories named .github work normally.
  • Preserve supported import forms, including nested object imports, ./ paths, repository-relative paths, /.github/, /.agents/ and #section references. Filesystem and symlink safeguards remain in the native resolver, and unsafe hash paths fail before reader access.
  • Extend shared cross-language fixtures to verify identical read paths, frontmatter/body hashes, mutation sensitivity, CRLF handling and inlined imports in normal and .github-named checkouts. Compare hash paths directly with the native import resolver.
  • Verify the compiler rejects missing and escaping direct/nested local imports before emitting a lock.
  • Accept privately marked, compiler-generated dry-run connector handlers directly in the existing validation loop. Authored and nil handlers remain rejected without copying or mutating workflow data. Forced staging omits connector writer credentials, even when an operation specifies staged: false.
  • Keep other host-code, custom MCP and OIDC restrictions unchanged. Reset activation API mocks before each case, prevent local fallback from masking API-path failures, and exercise strict fallback after connector import read failures. Update import and compilation guidance.

Validation

  • Focused native import/hash conformance, Go/JavaScript parity, compiler rejection and staged-handler regressions pass; 203 JavaScript hash/activation tests pass. All 81 activation cases also pass in shuffled order.
  • All 365 workflows recompile, and the workflow drift check passes. Resolver unification introduces no additional generated-lock changes.
  • smoke-issues --dry-run passes strict validation, model checks and ShellCheck, with two experimental connector notices. Diagnostic locks were preserved separately and the production lock restored.
  • The latest make agent-report-progress reports 21 verified pre-existing custom-linter findings in unchanged code: 11 in pkg/parser/frontmatter_hash.go, six in pkg/workflow/compiler_development_safety.go, and four in pkg/parser/remote_path_predicates.go. Go lint, JavaScript lint, impacted tests and schema checks otherwise pass; unrelated code was left unchanged.
  • Security review passed for the exact source and production lock. No live workflow was dispatched.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review November 11, 2026 18:53
Copilot AI adaptive review requested due to automatic review settings November 11, 2026 18:53
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from PR Specification Reviewer · gpt56 · ~3 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 1.6K · ◷

Generated by PR Specification Reviewer for #76933

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Generated by Ponytail Reviewer for #76933

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from PR Code Quality Reviewer · gpt56 · ~6 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 1.6K · ◷

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Test Quality Sentinel · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.2K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Design Decision Gate 🏗️

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Design Decision Gate 🏗️ · routed: sonnet55 high · ~6 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 8.5K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions github-actions Bot 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.

What this change does: It fixes the smoke workflow connector imports and allows generated connector handlers in dry-run compilation. I reviewed the validation path for a normal single-workflow compilation.

Should fix:

  1. The inline comment identifies a copied validation view that the existing validator can replace with a direct marker check. This removes extra plumbing while keeping authored scripts subject to the same check; keeping it leaves two validation paths to maintain.

Verdict: Ship.
Lean: -15 lines possible.

Generated by ✂️ Ponytail Reviewer for #76933 · codex · routed: gpt61 medium · ~5 AIC · ⌖ ~1 AIC · ⊞ 181
Comment /ponytail to run again

Comment thread pkg/workflow/compiler_connectors.go Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-11T18:57:32Z
review_event: COMMENT
top_themes: [test isolation / persistent mock implementation]
files_reviewed: [actions/setup/js/check_workflow_timestamp_api.test.cjs, pkg/workflow/compiler_connectors.go, pkg/workflow/compiler_development_safety.go, pkg/workflow/safe_scripts.go, pkg/workflow/imports.go]
comment_count: 1

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~6 AIC · ⌖ ~1 AIC · ⊞ 1.6K · ◷
Comment /review to run again

@github-actions github-actions Bot 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.

Found one actionable test-isolation issue: the new connector import regression leaves a persistent mock implementation that can affect later tests. The connector dry-run changes otherwise look consistent with the stated behavior. Static review only; tests were not run per review instructions.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~6 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again

@github-actions github-actions Bot 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.

Skills-Based Review 🧠

Applied /diagnosing-bugs and /tdd. No blocking issues found. Submitting COMMENT rather than APPROVE because the Go and JS suites could not be run in this sandbox.

📋 Verification notes

What was checked

  • Host-code gate exemption (/diagnosing-bugs): validateDryRunEffectsWithConnectors removes only scripts flagged connectorDryRun. That flag is set solely on compiler-generated <alias>-<operation> entries. An authored script with the same name is rejected at expansion by the conflicts with a connector effect check. MergeSafeOutputs merges only the fields in safeOutputHandlers, and Scripts is not one of them, so an import cannot add a same-named script that would inherit the exemption.
  • Credential re-narrow (attachConnectorInputSchemas): it only rewrites env entries that already exist. Dry-run never creates them, so it cannot add a live credential.
  • Regression coverage (/tdd): TestConnectorDryRunRejectsLiveParsedHandlers and the dry-run subtest exercise the rejection path. The JS smoke-issues connector imports block covers both API and local-fallback modes.

Not verified

Go 1.27.4 is required and the npm registry is unreachable here, so neither suite was run. The findings above come from static reading of HEAD.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~9 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No need

Resolve .github imports from the repository root in both hash walkers, including nested object imports. Cover missing and escaping compiler imports without changing unrelated pre-existing lint findings.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan pelikhan changed the title Fix smoke connector imports and allow staged connector dry-runs Support repository-relative imports and staged connector dry-runs Nov 11, 2026

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 tests can miss import-resolution regressions because the API case permits silent local fallback and the fallback case never exercises strict unresolved-import checks.

2 open issues
What changed in this PR

This PR fixes smoke-issues activation and allows compiler-generated connector handlers during gh aw dry-run compilation, while preserving restrictions on authored scripts.

Changes:

  • Switches smoke connector imports to workflow-relative paths and regenerates the production lock.
  • Exempts privately marked connector handlers from dry-run script rejection, while retaining forced staging and omitting connector writer credentials.
  • Adds activation and connector safety regressions, and documents the dry-run exception.
File Description
pkg/​workflow/​safe_scripts.go Adds a private marker for dry-run connector handlers.
pkg/​workflow/​connectors_test.go Tests forced staging, credential omission, and script rejection.
pkg/​workflow/​compiler_yaml.go Routes dry-run checks through connector-aware validation.
pkg/​workflow/​compiler_orchestrator_workflow.go Passes compiler state into connector schema attachment.
pkg/​workflow/​compiler_connectors.go Marks generated handlers and filters a cloned validation view.
docs/​src/​content/​docs/​reference/​compilation-process.md Documents staged connector support during dry-run compilation.
actions/​setup/​js/​check_workflow_timestamp_api.test.cjs Adds smoke source/lock coverage for API and local fallback paths.
.github/​workflows/​smoke-issues.md Corrects connector imports to workflow-relative paths.
.github/​workflows/​smoke-issues.lock.yml Refreshes import metadata and workflow hashes.
.github/​aw/​debug-compilation.md Clarifies the connector exception and remaining restrictions.

Review effort: Max (auto)

Use direct generated-handler validation and isolate GitHub API mocks. Prevent local fallback from masking API-path failures and exercise strict fallback after connector import read failures.

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

Copy link
Copy Markdown
Collaborator Author

No code change or ADR is needed for this design-gate notice, which reports no actionable finding or draft. This batch keeps the existing staging and credential-boundary design.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

No additional code change is needed for this completed review. Its static-only validation limitation is covered by the focused Go and JavaScript checks run for this batch.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

No separate code change is needed for this completion notice. The associated inline request was accepted: the copied validation wrapper is removed in favor of a direct marker check.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

No code change is needed for this saved reviewer metadata. The related mock-isolation finding is fixed; the managed comment and memory block are unchanged.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

The actionable isolation finding behind this review status is fixed by resetting getContent before each test. The status notice itself needs no separate source change.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

No code change is needed for this test-quality completion notice, which contains no requested action. The affected suites were independently run for this batch rather than treating the status as test evidence.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

No code change is needed for this completion notice. It reports no actionable specification feedback, so I have not treated the status alone as verification.

Use the imports resolver's base selection, section parsing, and lexical containment for hash readers. Keep checkout handling name-agnostic and verify Go/JavaScript parity for normal and .github repositories.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan merged commit 548a679 into main Nov 11, 2026
69 checks passed
@pelikhan
pelikhan deleted the pelikhan/smoke-linear-investigation branch November 11, 2026 20:12
@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.

3 participants