Skip to content

Commit 28d39de

Browse files
committed
Pin CL-7927 hardening expectations before fixing
Failing tests for the Codex non-JSON passthrough, the grant-notice force spelling, and the markdown link underline absence; the telemetry comment softening rides along.
1 parent 35c8cd6 commit 28d39de

4 files changed

Lines changed: 37 additions & 6 deletions

File tree

‎src/permission/gate.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ describe("grant-mismatch asks carry the guard reason as a notice (CL-6824)", ()
345345
expect(verdict.allowed).toBe(false);
346346
expect(seen).toHaveLength(1);
347347
expect(seen[0]?.notice).toBe(
348-
"A standing grant matches this command, but it uses --force, so it still needs approval.",
348+
"A standing grant matches this command, but it uses --force=true, so it still needs approval.",
349349
);
350350
});
351351

@@ -357,7 +357,7 @@ describe("grant-mismatch asks carry the guard reason as a notice (CL-6824)", ()
357357
expect(verdict.allowed).toBe(false);
358358
expect(seen).toHaveLength(1);
359359
expect(seen[0]?.notice).toBe(
360-
"A standing grant matches this command, but it uses --force, so it still needs approval.",
360+
"A standing grant matches this command, but it uses -f=true, so it still needs approval.",
361361
);
362362
});
363363

@@ -369,7 +369,7 @@ describe("grant-mismatch asks carry the guard reason as a notice (CL-6824)", ()
369369
expect(verdict.allowed).toBe(false);
370370
expect(seen).toHaveLength(1);
371371
expect(seen[0]?.notice).toBe(
372-
"A standing grant matches this command, but it uses --force, so it still needs approval.",
372+
"A standing grant matches this command, but it uses -ftrue, so it still needs approval.",
373373
);
374374
});
375375

‎src/provider/codex-responses.test.ts‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { describe, expect, test } from "bun:test";
22
import { BEARER_CREDENTIAL_SENTINEL } from "@intx/inference";
3+
import type { ProviderAdapter } from "@intx/inference";
34
import type { ConversationTurn, LastCycleSource } from "@intx/types/runtime";
45
import { ENVIRONMENT_TAG_NAME, PRODUCT_NAME } from "../branding.js";
56
import {
67
CODEX_ACCOUNT_ID_OPTION,
78
CODEX_RESPONSES_PROVIDER,
89
CODEX_SESSION_ID_OPTION,
910
createCodexResponsesAdapter,
11+
withParallelToolCalls,
1012
} from "./codex-responses.js";
1113

1214
const source: LastCycleSource = {
@@ -74,6 +76,22 @@ describe("createCodexResponsesAdapter", () => {
7476
expect(body.parallel_tool_calls).toBe(true);
7577
});
7678

79+
test("passes a non-JSON body through unrewritten (CL-7927)", () => {
80+
const stub = {
81+
buildRequest: () => ({
82+
url: "/codex/responses",
83+
headers: {},
84+
body: "not-json",
85+
}),
86+
} as unknown as ProviderAdapter;
87+
const request = withParallelToolCalls(stub).buildRequest(
88+
[userTurn("hello")],
89+
"gpt-5.1-codex",
90+
{},
91+
);
92+
expect(request.body).toBe("not-json");
93+
});
94+
7795
test("wraps the system prompt with host product identity as a developer item", () => {
7896
const adapter = createCodexResponsesAdapter(source);
7997
const request = adapter.buildRequest([userTurn("x")], "gpt-5.1-codex", {

‎src/tui/stream.test.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
streamRowGutter,
1212
toolRowLines,
1313
toolSentenceLines,
14+
transcriptSyntaxStyle,
1415
type RowLayout,
1516
type StreamRow,
1617
} from "./stream";
@@ -533,3 +534,15 @@ describe("sub-agent dispatch row marks", () => {
533534
expect(streamRowGutter(merged, SOLO).content).toContain("✓");
534535
});
535536
});
537+
538+
// TUI markdown links are click-only: there is no hover tracking, so no hover
539+
// state may add an affordance the idle render does not have. Pin
540+
// underline-absence on the link scopes so a future hover style cannot sneak
541+
// one in (CL-7927).
542+
describe("transcriptSyntaxStyle markdown links", () => {
543+
test("link cells carry no underline", () => {
544+
const styles = transcriptSyntaxStyle().getAllStyles();
545+
expect(styles.get("markup.link")?.underline).not.toBe(true);
546+
expect(styles.get("markup.link.url")?.underline).not.toBe(true);
547+
});
548+
});

‎tests/unit/telemetry-product-events.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ test("first-party skill names are reported by name; everything else stays custom
245245
expect(classifySkillName("acme-internal-deploy")).toBe("custom");
246246
// Bundled catalog skills outside the closed allowlist are not reported by
247247
// name either — the allowlist is the closed set, not the skills directory.
248-
// All four bake-only background skills (user-invocable: false, baked into
249-
// agent prompts rather than invoked as skills) stay custom, while the
250-
// seven flagged-but-allowlisted use_skill-only recipes assert by name above.
248+
// All four hidden-from-discovery background skills (explicit loads still
249+
// resolve) stay custom, while the seven flagged-but-allowlisted
250+
// use_skill-only recipes assert by name above.
251251
expect(classifySkillName("idiot-proof")).toBe("custom");
252252
expect(classifySkillName("native-integration")).toBe("custom");
253253
expect(classifySkillName("native-runtime")).toBe("custom");

0 commit comments

Comments
 (0)