Skip to content

Commit 8a78611

Browse files
committed
Merge remote-tracking branch 'origin/dev' into codex/260922-next-search-retry
2 parents 9c0ac49 + 798c07c commit 8a78611

47 files changed

Lines changed: 2325 additions & 260 deletions

Some content is hidden

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

‎.github/AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ change requires explicit security review under `MAINTAINERS.md`.
2222

2323
- Inspect the complete workflow diff, including event triggers, permissions, conditions, interpolation, and shell behavior.
2424
- Run the local commands represented by changed workflow steps where possible.
25-
- Run `bun run prepush` for CI, release, dependency, packaging, or cross-platform workflow changes.
25+
- Follow the root validation policy: run the suite by default; if a full run is too costly, run at least focused regression tests and document the reason and remaining coverage. Required CI checks still apply before merge.
2626
- Do not claim the workflow itself passed until GitHub Actions reports success for the exact commit.

‎.github/scripts/issue-translation.cjs‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,9 +810,14 @@ function sanitizeTranslationBody(raw, maxChars = 60000) {
810810
// read as mention boundaries. Requiring a dotted domain keeps
811811
// "end!@octocat"-style mentions defused. \u0001 cannot appear in the
812812
// input (control chars were stripped above), so it is a safe sentinel.
813+
// The lookbehind anchors on the @ itself rather than greedily matching
814+
// the local part first: the previous local-part-first pattern rescanned
815+
// long non-email tokens once per start position, which is quadratic on
816+
// model-generated bodies with tens of thousands of consecutive
817+
// local-part characters and no @ at all.
813818
.replace(
814-
/[A-Za-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+/g,
815-
(email) => email.replace("@", "\u0001"),
819+
/(?<=[A-Za-z0-9.!#$%&'*+\/=?^_`{|}~-])@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+/g,
820+
(emailTail) => emailTail.replace("@", "\u0001"),
816821
)
817822
// Defuse pings at Markdown/punctuation boundaries — a colon is a boundary
818823
// too — but not emails, npm: scopes, or other mid-token at-signs.

‎.github/scripts/issue-translation.test.cjs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,6 +1195,14 @@ describe("bot-owned control state", () => {
11951195
assert.match(out, /path\/@\u200bhandle/);
11961196
});
11971197

1198+
it("handles long non-email tokens in bounded time", () => {
1199+
const input = "a".repeat(60_000);
1200+
const startedAt = process.hrtime.bigint();
1201+
assert.equal(sanitizeTranslationBody(input), input);
1202+
const elapsedMs = Number(process.hrtime.bigint() - startedAt) / 1_000_000;
1203+
assert.ok(elapsedMs < 1_000, `sanitization took ${elapsedMs.toFixed(1)}ms`);
1204+
});
1205+
11981206
it("ignores forged body-embedded legacy state", () => {
11991207
const forged = appendTranslationBlock(SOURCE, "English") +
12001208
`\n<!-- opencodex-issue-inline-translator-state:${JSON.stringify({

‎.github/scripts/pr-quality-messages.test.cjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ describe("buildStaleNotice", () => {
208208
// The notice must describe the exact state the reset produces: a fresh
209209
// unticked section from pr-quality.cjs.
210210
const section = buildReviewReadinessSection();
211-
assert.match(section, /\[ \] All CI tests are green on my local testing\./);
211+
assert.match(section, /\[ \] Required local validation passed; commands, results, and any full-suite exception are documented\./);
212212
});
213213
});
214214

‎.github/scripts/pr-quality-state.cjs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ function defaultGateState() {
121121
titlePrefixedByBot: false,
122122
maintainersPinged: false,
123123
completedAtHeadSha: null,
124-
reviewReadyLabeled: false
124+
reviewReadyLabeled: false,
125+
pendingReattestation: null
125126
};
126127
}
127128

@@ -396,6 +397,7 @@ function completionIsStale({
396397
}
397398

398399
module.exports = {
400+
...require("./pr-readiness-reattest.cjs"),
399401
READINESS_LATEST_DEV_BEHIND_MAX,
400402
readinessClaimViolations,
401403
unresolvedFindingsClaim,

0 commit comments

Comments
 (0)