Skip to content

Commit 4337eca

Browse files
committed
docs(agents): restore orphaned traps and close guidance-gate bypasses
- AGENTS.md: skills carry a minimal start/routing card; command semantics stay in versioned CLI help (the skills contract enumerates two skills by hand, so prose retains ownership for the rest) - testing.md: restore the two local-only XCTest snags CI never hits (unsigned-bundle policy refusal signature + first-run automation permission) - scripts/gate/routing.ts: record GitHub's 300-changed-file path-filter limit at the paths-ignore assertion it bounds - agent-guidance-contract.test.ts: recurse docs/agents so nested guidance cannot evade the byte budgets while the gate stays green
1 parent 66dfb9f commit 4337eca

4 files changed

Lines changed: 14 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ cross-language rules change through golden tables under `contracts/fixtures/`.
7070
- Apple target changes keep the kernel device model, capability admission, dispatch resolution,
7171
Apple discovery, and xctestrun preparation in sync.
7272
- iOS simulator-set scoping must never hide the host macOS desktop target.
73+
- Skills may carry a minimal start/routing card; command semantics belong in versioned CLI help.
7374
- Do not add compatibility or fallback behavior without explicit approval. Complete migrations and
7475
remove superseded paths.
7576
- Keep changes within one command family or module group unless the task explicitly crosses a

docs/agents/testing.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ Apple runner changes run `pnpm check:xctest-selection` and build the affected ta
4141
`#if` guard is the XCTest lane classification; do not maintain a second test-name list. Pure runner
4242
decisions use the macOS host lane, while iOS/XCTest semantics require a simulator lane.
4343

44+
Local host-lane XCTest runs hit two snags CI never does. System policy may refuse the unsigned
45+
bundle (`library load disallowed by system policy`, surfacing as `Early unexpected exit … crashed
46+
with signal kill`); rebuild signed, with `CODE_SIGN_IDENTITY="Apple Development"` or a manual
47+
identity from `security find-identity -v -p codesigning`. The first run also needs XCUITest
48+
automation permission for the host app.
49+
4450
Live smoke commands and their environment contracts live with their harnesses:
4551

4652
- web: `test/integration/smoke-web-platform.test.ts`

scripts/__tests__/agent-guidance-contract.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ test('high-traffic guidance stays within its reviewed context budget', async ()
2828

2929
test('task guidance stays focused instead of growing another handbook', async () => {
3030
const directory = path.join(ROOT, 'docs', 'agents');
31-
const files = (await readdir(directory)).filter((file) => file.endsWith('.md'));
31+
const files = (await readdir(directory, { recursive: true })).filter((file) =>
32+
file.endsWith('.md'),
33+
);
3234
let totalBytes = 0;
3335

3436
for (const file of files) {

scripts/gate/routing.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
// the YAML a derived artifact: over every tracked path, the lane must start whenever the
88
// selector says the change can reach it, and must not start on a path the selector places on
99
// another family's device-lane surface or classifies as a unit test.
10+
//
11+
// One limit is GitHub's, not this assertion's: path filters examine only the first 300 changed
12+
// files, so a PR larger than that can skip a routed lane on the strength of its first 300 paths
13+
// alone. The unfiltered `push` to main is the backstop.
1014

1115
import { deviceLanesFor, isDeviceLaneSurface, isUnitTest } from '../check-affected/device-lanes.ts';
1216
import { isDocs, selectChecks, type CheckId } from '../check-affected/model.ts';

0 commit comments

Comments
 (0)