Skip to content

v1.91.161.0 fix(pregate): Django, Dart, asset and tool-config lanes; init drafts from the repo (#3266-#3269) - #3306

Merged
capy-ai[bot] merged 12 commits into
mainfrom
capy/pregate-non-js
Oct 20, 2026
Merged

capy-ai[bot] merged 12 commits into
mainfrom
capy/pregate-non-js

Conversation

@garrytan

Copy link
Copy Markdown
Owner

gstack-pregate stopped /ship with PREGATE_NO_LANE on routine changes in Django, Dart and Flutter repos, and on branches that only touched assets or tool config, even in repos that never opted in. This fixes the four user reports and lands two contributor PRs.

Issues

Fixes #3266
Fixes #3267
Fixes #3268
Fixes #3269

Supersedes #3285 (@arlophoenix, squashed with Co-authored-by) and #3290 (@szsunyuan, cherry-picked with authorship kept).

What changes

Review

gstack /review (Claude Opus 5.5) plus two outside-voice rounds on GPT-6 Astra. Fixes made on top of the contributor code: a cd in a pipeline, ||, background job, control flow, command substitution or redirected subshell now leaves a CI lane's test set unknown instead of resolving later paths against the wrong directory (which dropped a Windows obligation in a probe); Dart directives are read to the next unquoted ; with metadata and nested comments, so an unindented conditional import no longer loses edges. #3286 (user-owned policy) is not ported: review found that the repo's .env (auto-loaded by Bun) can redirect the user-policy path, so it got a request-changes comment.

Gate integrity

Checks run

typecheck clean; test typecheck ratchet 819 known, none new; pregate suites (non-js 11, dart 21, selection 28, docs-lane-review 3, import-graph-paths 12, manifest-paths 4, bats-nested 6, wtree-refusal 8, invalidation 3, guards 11, regate 8) all green; troubleshooting-anchors 223, module-size ratchet, spawnsync tripwire green; credential scan clean. gstack-pregate --stage tests --remote (Ubicloud, $0.04): 9301 tests, 0 failed on tree 343024f33de4; macOS and Windows lanes left to CI. Paid gate selection: the full PR gate (every case reaches bin/gstack-pregate).

Open in Capy

garrytan and others added 6 commits October 19, 2026 18:33
Port of arlophoenix's #3285. The import graph reads Dart import/export/part
directives and resolves package: URIs through every tracked pubspec.yaml;
_test.dart files under test/ are tests. lanes runs each Dart package's
selected tests from its own root with flutter test or dart test (through fvm
when the package pins it). flutter/dart/melos/very_good CI jobs are lanes,
and run-step test paths resolve against working-directory and literal cd.
A missing Dart SDK or a .dart file outside any package leaves the lane
incomplete with a fix line; device tests (integration_test/, test_driver/)
are not unit lanes.

Co-authored-by: arlophoenix <arlo.phoenix@gmail.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…impossible fetch (#3269)

gstack-pregate --base <sha> refused with "fix: git fetch origin <sha>
--depth=1". That fetch can never create origin/<sha>: a short SHA fails
with "couldn't find remote ref", and a full SHA only reaches FETCH_HEAD.
A fork clone hits the same wall with --base upstream/main.

When origin/<base> does not resolve but <base> names a commit here and
no local branch (a SHA, a tag, another remote's ref), the refusal now
says --base takes a branch name on origin and suggests origin/HEAD's
branch. A local branch, or a name that resolves nowhere, keeps the
fetch fix: that is the unfetched or shallow checkout it repairs. Same
code, same exit 3, and pin files are still read only from the reviewed
origin/<base>.

Fixes #3269

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he repo (#3266, #3267, #3268)

- Django: settings modules, settings strings, include(), app migrations,
  admin, templates, static files and project templates get framework edges
  (lib/pregate/django.ts).
- Assets, stylesheets and dotfile tool config take a no-tests empty lane;
  licence text under any name is documentation.
- gstack-pregate init drafts languages, runner notes and nearest-test
  dependencies; never writes [].
- Review fixes on the #3285 port: untracked shell scopes leave a lane
  unknown; Dart directives read to their semicolon; nested comments.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… has a lane

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
- Tool config is an allowlist: unknown dotfiles (.rspec, .husky hooks) and
  stylesheets still need a lane; snapshot, golden and fixture trees and
  .gstack/ are never inert.
- Django edges need Django evidence (manage.py or code importing django)
  and settings assignments in code, not strings or comments.
- A cd after ||, &, control flow or braces leaves a lane unknown.
- Dart directives allow metadata and quoted semicolons.
- init drafts at most 256 dependencies (the schema limit); the rest are TODO.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

E2E Evals: ❌ FAIL

[test:paid] VERDICT RED — lane gate/pr, attempt 1
  rule 107/108 · behavior 0/0 · judge 24/24 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 2
  wall 7m01s · cost $32.78 known + 54 of 132 trial(s) cost unknown

121 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $32.78 rule/judge cost | reconcile exit: 1

Profile: pr / mode dependents; selected behaviors: 108, judges: 24. Deferred to scheduled/release coverage: 138 behaviors and 0 changed prompt files. Deferred checks did not run and receive no PR-pass credit.

Derived dependents (scripts/pr-dependencies.ts):

  • bin/gstack-pregate: 246 case(s), 24 judge(s)
  • lib/pregate/checks/lanes.ts: 246 case(s), 24 judge(s)
  • lib/pregate/checks/strays.ts: 246 case(s), 24 judge(s)
  • lib/pregate/config.ts: 246 case(s), 24 judge(s)
  • lib/pregate/context.ts: 246 case(s), 24 judge(s)
  • lib/pregate/django.ts: 246 case(s), 24 judge(s)
  • lib/pregate/docs-lane.ts: 246 case(s), 24 judge(s)
  • lib/pregate/import-graph.ts: 246 case(s), 24 judge(s)
  • lib/pregate/init-draft.ts: 246 case(s), 24 judge(s)
  • lib/pregate/lane-selection.ts: 246 case(s), 24 judge(s)
  • lib/pregate/workflows.ts: 246 case(s), 24 judge(s)
  • scripts/lib/windows-curation.ts: 246 case(s), 24 judge(s)
  • test/helpers/pregate-fixture.ts: 246 case(s), 24 judge(s)
Rule and judge shards
Shard Automated result Manual/unscored Executed Reused Status Cost
e2e-deploy/skill-e2e-deploy--setup-deploy-workflow 1/1 0 1 0 ✅ $0.09
e2e/skill-e2e-coverage-audit 2/2 0 2 0 ✅ $0.35
llm-judge/skill-llm-eval 24/24 0 24 0 ✅ $1.44
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-current 1/1 0 1 0 ✅ $0.94
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-store 1/1 0 1 0 ✅ $1.13
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-completion 1/1 0 1 0 ✅ $1.01
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-plan-checks 1/1 0 1 0 ✅ $0.7
e2e/skill-e2e-test-value 3/3 0 3 0 ✅ $0.86
e2e-qa-callers/skill-e2e-qa-callers--review-exploratory-small-cli 1/1 0 1 0 ✅ $0.76
e2e-qa-workflow/skill-e2e-qa-workflow--qa-only-no-fix 1/1 0 1 0 ✅ $0.57
e2e/skill-e2e-shared-libs--shared-libs-read-only 1/1 0 1 0 ✅ $0.27
e2e-docsync-spawned/skill-e2e-docsync-spawned 1/1 0 1 0 ✅ $0.42
e2e-deploy/skill-e2e-deploy--land-and-deploy-first-run 1/1 0 1 0 ✅ $0.37
e2e-deploy/skill-e2e-deploy--land-and-deploy-review-gate 1/1 0 1 0 ✅ $0.19
e2e-review-army/skill-e2e-review-army--review-army-migration-safety 1/1 0 1 0 ✅ $0.28
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-stale-after 1/1 0 1 0 ✅ $0.33
e2e-learnings/skill-e2e-learnings 1/1 0 1 0 ✅ $0.13
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-late-result 1/1 0 1 0 ✅ $0.33
e2e-review-army/skill-e2e-review-army--review-army-json-findings 1/1 0 1 0 ✅ $0.07
e2e-deploy/skill-e2e-deploy--benchmark-workflow 1/1 0 1 0 ✅ $0.18
e2e/skill-e2e-investigate-owned-completion 1/1 0 1 0 ✅ $0.07
e2e/skill-e2e-shared-libs-paths--shared-libs-review-index-flags 1/1 0 1 0 ✅ $0.92
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-small-cli 1/1 0 1 0 ✅ $0.77
e2e-review-army/skill-e2e-review-army--review-army-perf-n-plus-one 1/1 0 1 0 ✅ $0.34
e2e-triage/skill-e2e-triage 1/1 0 1 0 ✅ $0.11
e2e-qa-workflow/skill-e2e-qa-workflow--qa-bootstrap 1/1 0 1 0 ✅ $0.08
e2e-third-party-actions/skill-e2e-third-party-actions 5/5 0 5 0 ✅ $0.43
e2e-design/skill-e2e-design--plan-design-review-no-ui-scope 1/1 0 1 0 ✅ $0.1
e2e-deploy/skill-e2e-deploy--canary-workflow 1/1 0 1 0 ✅ $0.11
e2e/skill-e2e-investigate-owned-termination 2/2 0 2 0 ✅ $0.18
e2e/skill-e2e-ship-hook-consent 2/2 0 2 0 ✅ $0.24
e2e-review-army/skill-e2e-review-army--review-army-delivery-audit 1/1 0 1 0 ✅ $0.16
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-timeout-unsettled 1/1 0 1 0 ✅ $0.17
e2e-session-intelligence/skill-e2e-session-intelligence 4/4 0 4 0 ✅ $0.3
e2e-design/skill-e2e-design--design-review-detector-shim 1/1 0 1 0 ✅ $0.14
e2e-plan-tune/skill-e2e-plan-tune 1/1 0 1 0 ✅ $0.12
e2e-safety-pair-agent/skill-e2e-safety-pair-agent 1/1 0 1 0 ✅ $0.1
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-launch-failure 1/1 0 1 0 ✅ $0.15
e2e/skill-e2e-ship-hook-refresh 1/1 0 1 0 ✅ $0.1
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-unavailable 1/1 0 1 0 ✅ $0.72
e2e/skill-e2e-plan--plan-review-report 1/1 0 1 0 ✅ $1.59
e2e-retro/skill-e2e-retro 1/1 0 1 0 ✅ $0.31
e2e-qa-functional-fix/skill-e2e-qa-functional-fix 2/2 0 2 0 ✅ $0.93
e2e/skill-e2e-ship-skip 1/1 0 1 0 ✅ $0.23
e2e-qa-workflow/skill-e2e-qa-workflow--qa-quick 1/1 0 1 0 ✅ $0.48
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-stale-before 1/1 0 1 0 ✅ $0.37
e2e-review-attribution/skill-e2e-review-attribution 3/3 0 3 0 ✅ $0.27
e2e/skill-e2e-shared-libs-paths--shared-libs-review-prior-coverage 1/1 0 1 0 ✅ $1.04
e2e/skill-e2e-shared-libs--shared-libs-review-lifecycle 1/1 0 1 0 ✅ $0.87
e2e-safety-codex-consult/skill-e2e-safety-codex-consult 1/1 0 1 0 ✅ $0.27
e2e-deploy/skill-e2e-deploy--land-and-deploy-workflow 1/1 0 1 0 ✅ $0.59
e2e/skill-e2e-workflow 4/4 0 4 0 ✅ $0.97
e2e-review-army/skill-e2e-review-army--review-army-quality-score 1/1 0 1 0 ✅ $0.1
e2e-hermetic/skill-e2e-hermetic-canary 2/2 0 2 0 ✅ $0.03
e2e-browse/skill-e2e-bws 6/6 0 6 0 ✅ $0.29
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-missing-asset 1/1 0 1 0 ✅ $0.37
e2e-design/skill-e2e-design--design-review-plugin-handoff 1/1 0 1 0 ✅ $0.15
e2e-design/skill-e2e-design--design-review-detector-shim-dom 1/1 0 1 0 ✅ $0.28
e2e-safety-ship-evidence/skill-e2e-safety-ship-evidence 1/1 0 1 0 ✅ $0.12
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-missing-marker 1/1 0 1 0 ✅ $0.17
e2e/skill-e2e-shared-libs--shared-libs-unsupported-git 1/1 0 1 0 ✅ $0.19
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-recovery 1/1 0 1 0 ✅ $0.33
e2e-review/skill-e2e-review 2/2 0 2 0 ✅ $0.33
e2e/skill-e2e-shared-libs--shared-libs-review-revalidation 1/1 0 1 0 ✅ $1.88
e2e-qa-functional/skill-e2e-qa-functional 2/2 0 2 0 ✅ $0.75
e2e-cso/skill-e2e-cso 1/1 0 1 0 ✅ $0.41
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-late-input 0/1 0 1 0 ❌ $0.98
e2e-skillify/skill-e2e-skillify 3/3 0 3 0 ✅ $0.83
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-failure 1/1 0 1 0 ✅ $0.47
e2e/skill-e2e-shared-libs-paths--shared-libs-review-path-eligibility 1/1 0 1 0 ✅ $1.45
Fail-closed reconciliation
ce 14  passed             51s  test/skill-e2e-third-party-actions.test.ts
  slice 14  passed             26s  test/skill-e2e-plan-tune.test.ts
  slice 14  passed             22s  test/skill-e2e-triage.test.ts
  slice 14  passed             35s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-timeout-unsettled
  slice 14  passed             36s  test/skill-e2e-ask-user-question-format-compliance.test.ts
  slice 14  passed             22s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-launch-failure
  slice 14  passed             28s  test/skill-e2e-session-intelligence.test.ts
  slice 14  passed             31s  test/skill-e2e-ship-hook-consent.test.ts
  slice 14  passed             21s  test/skill-e2e-investigate-owned-termination.test.ts
  slice 14  passed             24s  test/skill-e2e-design.test.ts#design-review-detector-shim
  slice 14  passed             22s  test/skill-e2e-deploy.test.ts#canary-workflow
  slice 14  passed             30s  test/skill-e2e-ship-hook-refresh.test.ts
  slice 14  passed             18s  test/skill-e2e-design.test.ts#plan-design-review-no-ui-scope
  slice 14  passed             35s  test/skill-e2e-review-army.test.ts#review-army-delivery-audit
  slice 14  passed             22s  test/skill-e2e-safety-pair-agent.test.ts
  slice 14  passed             22s  test/skill-e2e-qa-workflow.test.ts#qa-bootstrap
  slice 15  passed             18s  test/skill-e2e-learnings.test.ts
  slice 15  passed             14s  test/skill-e2e-diagram.test.ts
[test:paid] collector final outcomes: 121 executed, 0 reused; 120 passed, 1 failed, 0 manual accepted (unscored; no score-cache credit) (121 attempt records from 70 collectors; every record counts)
[test:paid] deselected testcases, zero credit (312):
[test:paid]    298  sibling case of a case shard (its own shard runs it)
[test:paid]      8  periodic-tier case (this lane runs gate)
[test:paid]      6  Bun hook placeholder of a skipped describe block (not a test)
[test:paid] VERDICT RED — lane gate/pr, attempt 1
  rule 107/108 · behavior 0/0 · judge 24/24 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 2
  wall 7m01s · cost $32.78 known + 54 of 132 trial(s) cost unknown
[test:paid] failures and split verdicts:
  ✗ ship-exploratory-late-input  rule  FAIL  assertion — expect(received).toEqual(expected)  · cause assertion: session completed; check failed  Expected: [] · Received: [ "command outside declared caller observation interface", "receipt status inconclusive differs from helper verdict pass", ]  [slice 7, attempt 1]  evidence: paid-slice-7-a1/shards/skill-e2e-qa-callers--ship-exploratory-late-input (fetch: bun run eval:pass-rates --run 39351737002 --case ship-exploratory-late-input)  after a repair: bun run scripts/test-paid-shards.ts --tier gate --case ship-exploratory-late-input
[test:paid] exercised-path map (shadow, non-blocking): 6 MAP_GAP line(s) over 101 executed case(s) with recorded commands
  MAP_GAP document-release bin/gstack-banned-terms: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP plan-review-report bin/gstack-plan-reality: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP plan-review-report browse/dist/browse: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP plan-review-report design/dist/design: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP review-army-migration-safety bin/gstack-approval-classes: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)
  MAP_GAP test-audit-report-only design/dist/design: non-blocking for this PR; the next census refresh widens the map (docs/TESTING_INTERNALS.md#exercised-path-map)

Sliced lane: planner → duration-packed executors → fail-closed report. Behavior cases run a pre-registered 3-trial panel (PASS at 2/3 with no contract violation); a PASS 2/3 is shown with its failed trial, never as a clean pass. Reused results retain their original provenance and expiry.

Failures and split verdicts

✗ ship-exploratory-late-input  rule  FAIL  assertion — expect(received).toEqual(expected)  · cause assertion: session completed; check failed  Expected: [] · Received: [ "command outside declared caller observation interface", "receipt status inconclusive differs from helper verdict pass", ]  [slice 7, attempt 1]  evidence: paid-slice-7-a1/shards/skill-e2e-qa-callers--ship-exploratory-late-input (fetch: bun run eval:pass-rates --run 39351737002 --case ship-exploratory-late-input)  after a repair: bun run scripts/test-paid-shards.ts --tier gate --case ship-exploratory-late-input

…gate fixtures

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai

capy-ai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

flaky: qa-only-no-fix, failed in https://github.com/garrytan/gstack/actions/runs/39313931713 (attempt 1, slice 8: QA deadline: unsupported outer shell composition), passed on rerun https://github.com/garrytan/gstack/actions/runs/39313931713/attempts/2, logged for the daily flaky-fix pass.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
@capy-ai

capy-ai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

flaky: review-exploratory-small-cli, failed in https://github.com/garrytan/gstack/actions/runs/39320737890 (attempt 1, slice 8), passed on rerun attempts 2 and 3, logged for the daily flaky-fix pass.

flaky: ship-exploratory-plan-checks, failed in https://github.com/garrytan/gstack/actions/runs/39320737890/attempts/2 (slice 8, duplicate unchanged passing probe; it passed on attempt 1), passed on rerun https://github.com/garrytan/gstack/actions/runs/39320737890/attempts/3, logged for the daily flaky-fix pass.

garrytan and others added 2 commits October 20, 2026 01:07
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@github-actions github-actions Bot changed the title fix(pregate): Django, Dart, asset and tool-config lanes; init drafts from the repo (#3266-#3269) v1.91.161.0 fix(pregate): Django, Dart, asset and tool-config lanes; init drafts from the repo (#3266-#3269) Oct 20, 2026
@capy-ai

capy-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

flaky: ship-exploratory-late-input, failed in 39351737002 attempt 1 (eval-slices 7: "command outside declared caller observation interface"), passed on rerun 39351737002 attempt 2, logged for the daily flaky-fix pass.

flaky: test/setup-ps1.test.ts PowerShell 5.1 legacy cases, failed in 39351736921 (windows-setup, 5 s timeout, exit null), passed on rerun 39351736921 attempt 2, logged for the daily flaky-fix pass.

@capy-ai

capy-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Merging under Garry's flaky-test rule (2026-10-19). ship-exploratory-late-input failed in attempt 1 of run 39351737002 and passed on the rerun of slice 7 only. setup-ps1 PS 5.1 timed out, and its job rerun passed. Both are logged and unrelated to this diff. — GStack Minder

@capy-ai
capy-ai Bot merged commit 5ebda59 into main Oct 20, 2026
89 of 93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment