Skip to content

Commit 45a15f8

Browse files
committed
Merge branch 'main' into fix/i24371-cursor-via-acp-registry-can-t-pick-reaso
Resolved by hand in packages/provider-acp/src/server/adapter.ts: kept this branch's normalizeModelSelection flavor field next to main's alwaysSetModel and unsetOptionDefaults fields.
2 parents 507caef + e9e934b commit 45a15f8

553 files changed

Lines changed: 23310 additions & 4576 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/contribution-triage/SKILL.md‎

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,12 @@ from evidence you could not access. Do not run untrusted PR code merely to decid
7171
Read the guide's linked sections before applying these checks. Inspect enough source to substantiate
7272
scope and behavioral claims; leave the full correctness, security, and performance audit to code review.
7373

74-
- Under [prior approval](../../../CONTRIBUTING.md#prior-approval), identify the actual failure and
75-
intended behavior. Inspect maintainer responses in the linked issue or discussion, including what
76-
direction and scope they approved. A link, label, or acknowledgment alone is not approval. Judge a
77-
claimed obvious-bug exception by purpose, impact, and necessary changes, without numeric cutoffs.
78-
Separately assess focused configuration of an established capability: identify what already exists,
79-
what the option controls, and its effects and necessary scope. This route does not require a proven
80-
obvious bug. Adding a setting alone establishes neither a new feature nor an approval exemption.
74+
- Under [fix a bug](../../../CONTRIBUTING.md#prior-approval), identify the actual failure and
75+
intended behavior. A feature, or anything on the guide's not-interested list, warrants closure
76+
unless a maintainer in the trusted exemption list asked for that PR. Inspect the request and the
77+
direction and scope it covers. A link, label, or acknowledgment alone is not a request. Judge a
78+
claimed bug fix by purpose, impact, and necessary changes, without numeric cutoffs. A setting that
79+
adds a workflow or changes a default is a feature.
8180
Check whether an alleged fix intentionally changes product behavior or overlooks an existing workflow.
8281
Preserve any useful documentation, onboarding, or discoverability problem when declining the solution.
8382
- Under [one problem](../../../CONTRIBUTING.md#one-problem), trace how each material change contributes
@@ -90,22 +89,11 @@ scope and behavioral claims; leave the full correctness, security, and performan
9089
as the guide requires them. Do not demand unrelated evidence or repo-wide tests. An unavailable local
9190
platform does not defeat adequate contributor evidence. Do not infer fabrication or AI authorship
9291
from writing style, suspicion, or a check you cannot reproduce.
92+
- Under [models](../../../CONTRIBUTING.md#models), use only the model and harness the PR names,
93+
usually in its closing attribution line.
9394

94-
### Configuration and workflow examples
95-
96-
- Hosting CLI-path configuration in [#11653](https://github.com/pingdotgg/t3code/pull/11653) is eligible
97-
for deeper review under the maintainer's ruling: it makes an existing capability configurable.
98-
It need not qualify as an obvious-bug repair or obtain prior feature approval on that basis.
99-
Still assess one underlying problem, necessary scope and credible verification. Deeper review can
100-
reject the configuration mechanism or its implementation.
101-
- Preserving Files as an independent tab in [#14436](https://github.com/pingdotgg/t3code/pull/14436)
102-
changes tab lifetime and navigation. The maintainer classified it as a broader workflow change
103-
requiring prior product-direction approval, which is absent. Propose closure for missing approval
104-
in a dry run, or carry out closure in authorized enforcement. Its good evidence does not make it
105-
eligible or justify keeping it pending after that ruling. The remedy is to obtain scope approval.
106-
107-
Use these examples to distinguish effects, not to exempt every configuration option. Apply current
108-
trusted policy and reassess changed submission evidence; neither example grants permanent eligibility.
95+
Bans in the guide are a maintainer decision. Report suspected spam to maintainers; do not ban or
96+
threaten a ban.
10997

11098
## Apply the outcome
11199

@@ -141,17 +129,17 @@ comment text but do not write to GitHub. Keep the eligibility finding separate f
141129
permission error, means the variable cannot be read; then report the closure as incomplete. The comment
142130
must name the violated rule, cite supporting submission evidence, link the maintained guide section,
143131
and give a concrete remedy. Missing contributor evidence can warrant closure; explain what must be
144-
established. Missing product approval calls for maintainer discussion, not an agent's product decision.
132+
established. The remedy for a feature is an Ideas discussion, not an agent's product decision.
145133
Close for multiple problems only when the independence of those changes is supported. Closing a PR
146134
does not require a configured Macroscope label.
147135
- **Needs explanation or maintainer decision.** Name the unresolved question and who can resolve it.
148136
Post the specific question on the PR when commenting is within the authorized scope, and verify it
149137
was posted. If tracing the source leaves an extra diff's necessity unclear, request the causal
150138
explanation needed. If established facts leave a product-direction choice to maintainers, identify
151139
that choice. Leave the PR open and pending that answer; do not mark it eligible. Do not substitute
152-
"the agent was uncertain" for a violated rule. Once maintainers establish that a workflow change
153-
requires approval and that approval is absent, apply the closure outcome instead of retaining a
154-
pending classification. Good verification does not cure missing approval.
140+
"the agent was uncertain" for a violated rule. Once a change is established as a feature with no
141+
maintainer request, apply the closure outcome instead of retaining a pending classification. Good
142+
verification does not make a feature eligible.
155143
- **Incomplete; retry required.** State the failed retrieval, missing access, truncated diff, or unfinished
156144
assessment and what is needed to resume. Do not convert operational failures into policy violations
157145
or hand the PR off as having passed. An inaccessible artifact is different from an omitted artifact.

‎.github/VOUCHED.td‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ github:tris203
8383
github:tsouth89
8484
github:UtkarshUsername
8585
github:vitalyiegorov
86+
-github:wSedlacek Opened over 130 unapproved PRs in 12 days, far past the open PR limit
8687
github:Yash-Singh1
8788
github:yashranaway
8889
github:Ymit24

‎.github/pull_request_template.md‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,11 @@ reproduction steps or environment where relevant. -->
1515
<!-- Explain how this fixes the problem. If it spans components or clients,
1616
explain why those changes are needed for the same fix. Split independent fixes. -->
1717

18-
## Scope and approval
19-
20-
<!-- Link the triaged bug issue or the discussion with explicit maintainer approval
21-
of direction and scope, including the approval comment. For a very small, focused
22-
fix of an obvious bug, explain why it qualifies without a prior issue or discussion.
23-
For focused configuration of an established capability, explain what already exists,
24-
what the option controls, and why its effects stay within that capability. Adding a
25-
setting alone is not a new feature or an approval exemption; broader workflow or
26-
behavior changes still need approval. Scope and verification requirements still apply.
27-
There is no line-count or file-count cutoff. -->
18+
## Scope
19+
20+
<!-- We accept bug fixes, not features. Link the issue that shows the bug. For a
21+
small fix of an obvious bug, say why it needs no issue. If a maintainer asked for
22+
this PR, link the request. -->
2823

2924
## Verification
3025

‎.github/readme/hero.webp‎

142 KB
Loading

‎.github/scripts/thread-transfer-report.cjs‎

Lines changed: 150 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const path = require("node:path");
33

44
const ARTIFACT_NAME = "thread-transfer-results";
55
const RESULT_FILE = "thread-transfer-result.json";
6+
const SCENARIOS_FILE = "thread-transfer-scenarios.json";
67
const COMMENT_MARKER = "<!-- t3-thread-transfer-report -->";
78
const PROVIDERS = ["codex", "claudeAgent"];
89
const OBSERVED_KEYS = [
@@ -29,6 +30,12 @@ const SCENARIO_KEYS = [
2930
"measuredMcpResultBytes",
3031
];
3132

33+
const SCENARIO_ROW_KEYS = ["phase", "metric", "unit", "observed", "ceiling"];
34+
// These labels come from the PR and reach a comment the bot posts: no markup, links or mentions.
35+
// GitHub still links plain text such as `GH-26`, so they are rendered as code spans.
36+
const SCENARIO_LABEL = /^[A-Za-z0-9][A-Za-z0-9 ,-]{0,79}$/;
37+
const MAX_SCENARIO_ROWS = 100;
38+
3239
function resultShaMarker(sha) {
3340
return `<!-- t3-thread-transfer-result-sha:${sha} -->`;
3441
}
@@ -85,15 +92,63 @@ function validateResult(value) {
8592
return value;
8693
}
8794

88-
function readResult(directory) {
95+
function validateScenarios(value) {
96+
assertExactKeys(value, ["schemaVersion", "providers"], "scenarios");
97+
if (value.schemaVersion !== 1) {
98+
throw new Error("scenarios.schemaVersion must be 1");
99+
}
100+
assertExactKeys(value.providers, PROVIDERS, "scenarios.providers");
101+
for (const provider of PROVIDERS) {
102+
const rows = value.providers[provider];
103+
if (!Array.isArray(rows) || rows.length > MAX_SCENARIO_ROWS) {
104+
throw new Error(
105+
`scenarios.providers.${provider} must list at most ${MAX_SCENARIO_ROWS} rows`,
106+
);
107+
}
108+
const seen = new Set();
109+
for (const [index, row] of rows.entries()) {
110+
const label = `scenarios.providers.${provider}[${index}]`;
111+
assertExactKeys(row, SCENARIO_ROW_KEYS, label);
112+
for (const key of ["phase", "metric"]) {
113+
if (typeof row[key] !== "string" || !SCENARIO_LABEL.test(row[key])) {
114+
throw new Error(`${label}.${key} must be a short plain label`);
115+
}
116+
}
117+
if (row.unit !== "bytes" && row.unit !== "count") {
118+
throw new Error(`${label}.unit must be bytes or count`);
119+
}
120+
assertMetric(row.observed, `${label}.observed`);
121+
assertMetric(row.ceiling, `${label}.ceiling`);
122+
const key = scenarioKey(row);
123+
if (seen.has(key)) throw new Error(`${label} repeats an earlier row`);
124+
seen.add(key);
125+
}
126+
}
127+
return value;
128+
}
129+
130+
function scenarioKey(row) {
131+
return `${row.phase}|${row.metric}`;
132+
}
133+
134+
function readArtifactFile(directory, name, validate) {
89135
if (!directory) return undefined;
90-
const file = path.join(directory, RESULT_FILE);
136+
const file = path.join(directory, name);
91137
if (!fs.existsSync(file)) return undefined;
92138
const stat = fs.lstatSync(file);
93139
if (!stat.isFile() || stat.size > 64 * 1_024) {
94-
throw new Error("thread transfer result must be a regular file smaller than 64 KiB");
140+
throw new Error(`${name} must be a regular file smaller than 64 KiB`);
95141
}
96-
return validateResult(JSON.parse(fs.readFileSync(file, "utf8")));
142+
return validate(JSON.parse(fs.readFileSync(file, "utf8")));
143+
}
144+
145+
function readResult(directory) {
146+
return readArtifactFile(directory, RESULT_FILE, validateResult);
147+
}
148+
149+
// Older runs upload only the result file, so a run without scenarios is still a valid run.
150+
function readScenarios(directory) {
151+
return readArtifactFile(directory, SCENARIOS_FILE, validateScenarios);
97152
}
98153

99154
function formatBytes(bytes) {
@@ -103,7 +158,7 @@ function formatBytes(bytes) {
103158
}
104159

105160
function formatValue(value, kind) {
106-
return kind === "messages" ? value.toLocaleString("en-US") : formatBytes(value);
161+
return kind === "bytes" ? formatBytes(value) : value.toLocaleString("en-US");
107162
}
108163

109164
function formatImpact(current, baseline, kind) {
@@ -136,6 +191,77 @@ const METRICS = [
136191
{ key: "measuredTurnWebSocketMessages", label: "Live turn messages", kind: "messages" },
137192
];
138193

194+
function providerLabel(provider) {
195+
return provider === "codex" ? "Codex" : "Claude";
196+
}
197+
198+
/**
199+
* The scenario rows of a run against the same rows on `main`. Rows that fail or differ from
200+
* `main` are listed in the open; the full table is collapsed below them.
201+
*/
202+
function renderScenarios(current, baseline, ceilingChanges) {
203+
if (!current) return { lines: [], failed: false };
204+
const header = [
205+
"| Provider | Scenario | Metric | Main baseline | This PR | Impact | PR ceiling | |",
206+
"| --- | --- | --- | ---: | ---: | ---: | ---: | --- |",
207+
];
208+
const all = [];
209+
const notable = [];
210+
let failed = false;
211+
let withoutBaseline = 0;
212+
213+
for (const provider of PROVIDERS) {
214+
const baselineRows = new Map(
215+
(baseline?.providers[provider] ?? []).map((row) => [scenarioKey(row), row]),
216+
);
217+
for (const row of current.providers[provider]) {
218+
const before = baselineRows.get(scenarioKey(row));
219+
const beforeObserved = before?.unit === row.unit ? before.observed : undefined;
220+
const pass = row.observed <= row.ceiling;
221+
failed ||= !pass;
222+
if (beforeObserved === undefined) withoutBaseline += 1;
223+
const line = `| ${providerLabel(provider)} | \`${row.phase}\` | \`${row.metric}\` | ${beforeObserved === undefined ? "—" : formatValue(beforeObserved, row.unit)} | ${formatValue(row.observed, row.unit)} | ${formatImpact(row.observed, beforeObserved, row.unit)} | ${formatValue(row.ceiling, row.unit)} | ${pass ? "✅" : "❌"} |`;
224+
all.push(line);
225+
if (!pass || (beforeObserved !== undefined && beforeObserved !== row.observed)) {
226+
notable.push(line);
227+
}
228+
if (beforeObserved !== undefined && before.ceiling !== row.ceiling) {
229+
ceilingChanges.push(
230+
`- ${providerLabel(provider)} \`${row.phase}\` \`${row.metric}\`: ${formatValue(before.ceiling, row.unit)} → ${formatValue(row.ceiling, row.unit)}`,
231+
);
232+
}
233+
}
234+
}
235+
236+
const compared = all.length - withoutBaseline;
237+
const summary = !baseline
238+
? `No \`main\` baseline exists yet for these ${all.length} scenario measurements.`
239+
: [
240+
notable.length > 0
241+
? `${notable.length} of ${all.length} scenario measurements changed or failed.`
242+
: `${compared === all.length ? "All " : ""}${compared} scenario measurements match \`main\`.`,
243+
...(withoutBaseline > 0 ? [`${withoutBaseline} have no \`main\` baseline.`] : []),
244+
].join(" ");
245+
return {
246+
failed,
247+
lines: [
248+
"### Other scenarios",
249+
"",
250+
summary,
251+
...(notable.length > 0 ? ["", ...header, ...notable] : []),
252+
"",
253+
"<details>",
254+
`<summary>All ${all.length} scenario measurements</summary>`,
255+
"",
256+
...header,
257+
...all,
258+
"",
259+
"</details>",
260+
"",
261+
],
262+
};
263+
}
264+
139265
function renderComment(input) {
140266
const current = input.current;
141267
const baseline = input.baseline;
@@ -154,16 +280,22 @@ function renderComment(input) {
154280
const pass = observed <= ceiling;
155281
failed ||= !pass;
156282
rows.push(
157-
`| ${provider === "codex" ? "Codex" : "Claude"} | ${metric.label} | ${baselineObserved === undefined ? "—" : formatValue(baselineObserved, metric.kind)} | ${formatValue(observed, metric.kind)} | ${formatImpact(observed, baselineObserved, metric.kind)} | ${formatValue(ceiling, metric.kind)} | ${pass ? "✅" : "❌"} |`,
283+
`| ${providerLabel(provider)} | ${metric.label} | ${baselineObserved === undefined ? "—" : formatValue(baselineObserved, metric.kind)} | ${formatValue(observed, metric.kind)} | ${formatImpact(observed, baselineObserved, metric.kind)} | ${formatValue(ceiling, metric.kind)} | ${pass ? "✅" : "❌"} |`,
158284
);
159285

160286
if (comparable && baseline.providers[provider].ceiling[metric.key] !== ceiling) {
161287
ceilingChanges.push(
162-
`- ${provider === "codex" ? "Codex" : "Claude"} ${metric.label}: ${formatValue(baseline.providers[provider].ceiling[metric.key], metric.kind)} → ${formatValue(ceiling, metric.kind)}`,
288+
`- ${providerLabel(provider)} ${metric.label}: ${formatValue(baseline.providers[provider].ceiling[metric.key], metric.kind)} → ${formatValue(ceiling, metric.kind)}`,
163289
);
164290
}
165291
}
166292
}
293+
const scenarios = renderScenarios(
294+
input.currentScenarios,
295+
input.baselineScenarios,
296+
ceilingChanges,
297+
);
298+
failed ||= scenarios.failed;
167299

168300
const baselineLink = input.baselineRun
169301
? `[\`${input.baselineRun.sha.slice(0, 7)}\`](${input.baselineRun.url})`
@@ -203,6 +335,7 @@ function renderComment(input) {
203335
"| --- | --- | ---: | ---: | ---: | ---: | --- |",
204336
...rows,
205337
"",
338+
...scenarios.lines,
206339
`Baseline: ${baselineLink} · PR result: ${currentLink} · Source CI: ${input.currentRun.conclusion}`,
207340
"",
208341
"<details>",
@@ -212,7 +345,7 @@ function renderComment(input) {
212345
"",
213346
...PROVIDERS.map(
214347
(provider) =>
215-
`- ${provider === "codex" ? "Codex" : "Claude"} decoded thread snapshot: ${formatBytes(current.providers[provider].observed.threadSnapshotDecodedBytes)}`,
348+
`- ${providerLabel(provider)} decoded thread snapshot: ${formatBytes(current.providers[provider].observed.threadSnapshotDecodedBytes)}`,
216349
),
217350
"",
218351
"</details>",
@@ -437,7 +570,14 @@ async function publish({ github, context, core }) {
437570
url: `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${process.env.BASELINE_RUN_ID}`,
438571
}
439572
: undefined;
440-
const body = renderComment({ current, baseline, currentRun, baselineRun });
573+
const body = renderComment({
574+
current,
575+
baseline,
576+
currentScenarios: readScenarios(process.env.PR_RESULT_DIR),
577+
baselineScenarios: readScenarios(process.env.BASELINE_RESULT_DIR),
578+
currentRun,
579+
baselineRun,
580+
});
441581
const published = await upsertCommentForCurrentHead(
442582
github,
443583
context,
@@ -458,4 +598,5 @@ module.exports = {
458598
resolve,
459599
upsertCommentForCurrentHead,
460600
validateResult,
601+
validateScenarios,
461602
};

0 commit comments

Comments
 (0)