mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-01 06:24:41 +01:00
test(shared-libs-plan-callers): a verbless unchanged-scope list is an exclusion; replay census 37186854666; TODOS for two census reds
This commit is contained in:
1 parent
b24b6d8fcf
commit
fcb4024fe2
4 files changed
+51
-2
No files matched your search
@@ -162,6 +162,19 @@ Deferred from the approved severe fix wave (docs/designs/SEVERE_FIX_WAVE_2026_10
|
||||
`rule` but gates on one judge sample. Decide under EVAL_POLICY whether it is
|
||||
a `judge` case (3 samples, mean) and supply pass-rate evidence before
|
||||
changing the kind. Effort S. **Priority:** P2.
|
||||
- **qa/SKILL.md workflow judge dips below its actionability floor** — census
|
||||
37186854666 (b24b6d8) scored actionability 3.67 < 4 (clarity 3, completeness
|
||||
4) on the same qa bundle bytes that passed in census 37182865432 (44ef18c);
|
||||
nothing under qa/, qa-only/ or scripts/resolvers changed between them. Red in
|
||||
2 of the 17 earlier censuses (36920606897, 36776104571). Judge kind, 3
|
||||
samples, unchanged threshold. Find which bundle step the low samples call
|
||||
unactionable before rewording. Effort S. **Priority:** P3.
|
||||
- **shared-libs-review-revalidation stalls mid-stream** — gate census 4 of
|
||||
37186854666: the `filtered` scenario's stream stopped after a thinking block
|
||||
at 07:51:21 and emitted nothing until the 657 s abort; the other three
|
||||
scenarios passed. First red in 18 censuses. Classify a silent provider stream
|
||||
as INFRA (no events for N minutes) rather than a test timeout. Effort S.
|
||||
**Priority:** P3.
|
||||
- **Floor runner cannot grant an owned Edit when the TTY collapses spaces** —
|
||||
PR run 37176835584 (7249f01): plan-ceo-finding-floor timed out at 600 s with
|
||||
the native "Do you want to make this edit to gstack-test-plan-ceo-floor.md?"
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"questions": [
|
||||
{
|
||||
"question": "D1 \u2014 Should the two new callers import the existing Retry-After parser or each carry a local copy?\nProject/branch/task: fixture repo on `main`, planning src/import-worker.ts and src/sync-route.ts (PLAN.md).\nELI10: Both new files need to turn a Retry-After header into a wait time exactly the way the scheduler does. The scheduler already gets that behavior from one small shared function in lib/retry-after.ts, which already takes null, an injected clock, a 3600-second cap and a caller fallback. The plan instead writes that logic again inside each new file. Three copies of \"the same\" rule tend to drift apart, and nothing would prove they still match.\nStakes if we pick wrong: with local copies, a later fix to one parser silently leaves the others behind and a caller waits the wrong amount or ignores a header; with reuse but no extra tests, an edge like a past date or empty header is matched by accident rather than by proof.\nRecommendation: A because the shared helper already has the required contract, is proven by the scheduler and its test, and reuse is a net line saving; the extra contract assertions cost minutes and turn \"matches the scheduler\" from assumption into proof.\nCompleteness: A=10/10, B=7/10, C=4/10\nPros / cons:\nA) Reuse lib helper + contract tests (recommended)\n \u2705 One source of truth: both callers inherit scheduler semantics by construction, not by copying\n \u2705 Adds the missing contract assertions (empty string, past date, date ceiling, injected now) so edge compatibility is proven\n \u2705 Net ~26 implementation lines never written; ~18 saved after tests\n \u274c A bug in lib/retry-after.ts now affects the scheduler and both new callers at once\nB) Reuse lib helper only\n \u2705 Same single source of truth and same implementation saving as A\n \u2705 Smallest possible diff: two import lines plus the already-planned integration tests\n \u274c Edge cases the callers rely on (past date\u21920, date cap, empty header) stay unpinned, so a later helper change could break them unnoticed\nC) Local parser per caller\n \u2705 No change to anything shared; each file is self-contained\n \u2705 Matches the current draft, so no plan amendment needed\n \u274c Three near-identical copies with no parity test; the plan's \"must match scheduler semantics\" requirement is asserted, never proven\n \u274c ~28 duplicated lines and extra per-caller tests just to re-establish an existing contract\nNet: trading a slightly larger shared blast radius (mitigated by a contract test) for provable compatibility and less code, versus independence bought with duplication and unproven parity.",
|
||||
"header": "Parser reuse",
|
||||
"multiSelect": false,
|
||||
"options": [
|
||||
{
|
||||
"label": "Reuse lib helper + contract tests",
|
||||
"description": "\u2705 Both new callers import retrySeconds from lib/retry-after.ts; no local parser is written. \u2705 Extend test/retry-after.test.ts with the untested edges the callers rely on: empty/whitespace\u2192fallback, \"0\"\u21920, \"3601\"\u21923600, far-future date\u21923600, past date\u21920, unsafe integer\u2192fallback, injected now honored. \u2705 Each caller's integration test asserts its own fallback and injected now are passed through. \u274c Shared failure now reaches scheduler plus both callers. Effort human ~1h / CC ~5 min. Scheduler semantics, existing callers and helper hardening unchanged."
|
||||
},
|
||||
{
|
||||
"label": "Reuse lib helper only",
|
||||
"description": "\u2705 Both new callers import retrySeconds from lib/retry-after.ts; no local parser is written. \u2705 Only the already-planned per-caller integration tests; no new shared-contract assertions. \u274c Edge cases (past date, date ceiling, empty header, injected now) remain unpinned beyond the existing 5 expects. Effort human ~45 min / CC ~3 min. Scheduler semantics, existing callers and helper hardening unchanged."
|
||||
},
|
||||
{
|
||||
"label": "Local parser per caller",
|
||||
"description": "\u2705 Keeps the draft as written: each caller carries its own ~14-line parser. \u2705 No shared code touched. \u274c Compatibility with scheduler semantics is unproven unless each caller also gets parity tests, adding more duplicated lines. \u274c Three copies to keep in sync with no mechanism to detect drift. Effort human ~2h / CC ~10 min. Scheduler semantics, existing callers and helper hardening unchanged."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4,13 +4,14 @@ import type { SharedQuestionSelector } from './shared-libs-eval-fixture';
|
||||
* A whole clause that only lists excluded work: a bare list of scope nouns and
|
||||
* an exclusion predicate, e.g. "Existing copies and helper hardening stay
|
||||
* unchanged", "Hardening is outside this decision", "Existing-caller migration
|
||||
* and helper hardening stay out of scope". A clause with any other verb, such
|
||||
* and helper hardening stay out of scope", and the verbless "Scheduler semantics,
|
||||
* existing callers and helper hardening unchanged". A clause with any other verb, such
|
||||
* as "Harden helper parsing so behavior stays unchanged", is not an exclusion.
|
||||
*/
|
||||
const SCOPE_ITEM = String.raw`(?:(?:the|existing|current|its|all|both|helper|parser|lib|shared|callers?|scheduler)[\s-]+)*(?:copies|callers?|hardening|migrations?|semantics|behaviou?r|contract|helper|parser)`;
|
||||
const SCOPE_STATE = String.raw`(?:unchanged|untouched|excluded|out of scope|outside|not part)`;
|
||||
// The predicate may combine exclusion states: "stay unchanged/out of scope", "remain unchanged and excluded".
|
||||
const SCOPE_EXCLUSION = new RegExp(String.raw`^${SCOPE_ITEM}(?:\s*,\s*${SCOPE_ITEM})*(?:,?\s+and\s+${SCOPE_ITEM})?\s+(?:is|are|stays?|remains?)\s+`
|
||||
const SCOPE_EXCLUSION = new RegExp(String.raw`^${SCOPE_ITEM}(?:\s*,\s*${SCOPE_ITEM})*(?:,?\s+and\s+${SCOPE_ITEM})?(?:\s+(?:is|are|stays?|remains?))?\s+`
|
||||
+ String.raw`${SCOPE_STATE}(?:\s*(?:\/|,|\bor\b|\band\b)\s*${SCOPE_STATE})*(?:\s+(?:of\s+)?(?:this|the)\s+(?:decision|scope|plan|change))?[.!]?$`, 'i');
|
||||
|
||||
/** Separate explicit exclusions from proposals; do not erase a following "but" clause. */
|
||||
|
||||
@@ -6,6 +6,7 @@ import capturedNoHardening from './fixtures/shared-libs-plan-callers-no-hardenin
|
||||
import capturedParity from './fixtures/shared-libs-plan-callers-parity-36776104571.json';
|
||||
import capturedOutOfScope from './fixtures/shared-libs-plan-callers-out-of-scope-37151477069.json';
|
||||
import capturedSlashScope from './fixtures/shared-libs-plan-callers-slash-scope-37174266054.json';
|
||||
import capturedVerbless from './fixtures/shared-libs-plan-callers-verbless-scope-37186854666.json';
|
||||
|
||||
// Exact native R1 from the September 22 timeout. R2 was saved in an Edit, but
|
||||
// never sent as a native AUQ; its public draft fields are reconstructed below.
|
||||
@@ -392,8 +393,19 @@ describe('bounded shared-code planning actor', () => {
|
||||
expect(run.refusals).toEqual([]);
|
||||
});
|
||||
|
||||
// Census 37186854666 refused this exact question: options end "Scheduler semantics,
|
||||
// existing callers and helper hardening unchanged", the same exclusion without a verb.
|
||||
test('actual native verbless exclusion keeps unchanged-helper reuse answerable', async () => {
|
||||
const run = actor();
|
||||
const result = await run.callback('AskUserQuestion', capturedVerbless);
|
||||
expect(result.updatedInput.answers).toEqual({ [capturedVerbless.questions[0].question]: capturedVerbless.questions[0].options[0].label });
|
||||
expect(run.refusals).toEqual([]);
|
||||
});
|
||||
|
||||
test.each([
|
||||
'Harden helper parsing so behavior stays unchanged.',
|
||||
'Harden helper parsing unchanged.',
|
||||
'Helper hardening unchanged and tighten helper validation.',
|
||||
'Existing callers stay unchanged/harden the helper.',
|
||||
'Helper hardening stays unchanged or tighten helper validation.',
|
||||
'Existing copies stay unchanged and tighten helper validation.',
|
||||
|
||||
Reference in new issue
Block a user