Repository navigation
Reshape the owned code that the comment sweep flagged MUST KILL #222
Copy link
Copy link
Open
Description
Context
#218 swept the comments out of the code this repository owns (#219 states the rule in AGENTS.md; the sweeps are #221 for plugins/pstack/ and #220 for the repository tooling). pstack's comment-sicko flagged code whose deleted comment was hiding a surprise in our own code (MUST KILL). The sweep PRs fixed the trivial flags in place: the resolver test's snapshot() empty catch, freshRoot's EEXIST rule (now a test), and RELEASED_PAIRS' append-only rule (now a test). This issue lists the reshapes they left: one line per flag with the symbol, its path, and the suggested reshape. The suggested reshapes are suggestions; read the code before choosing one.
Acceptance criteria
- Each item below is reshaped in a PR, or closed in this issue with the reason it stays as it is.
- A reshape does not restore a deleted comment, except one on the
AGENTS.mdkeep-list. - Each constraint under "Constraints whose comments were deleted" is encoded as a type, test or lint, or recorded here as accepted without enforcement.
- Each PR passes
verify, Unfret andlive-gate.
Plugin code (plugins/pstack/skills/poteto-mode/scripts/)
captureStreamcancel(),runner/run.ts: the emptycatch {}aroundreader.cancel()swallows every rejection, though the "already released" case comes from our ownfinally { reader.releaseLock() }; record that the read loop finished, skipcancel()then, and drop the catch.SharedGitDiscoveryanddiscoverSharedGitDir,runner/run.ts: split{ kind: "found", sharedGitDir: null }intononeanddenyvariants, and name the glob and control-character regex for the Claude CodedenyWritelimit it serves.ProviderAdapter.parse,runner/registry/contract.tsandrunner/run.ts: after a nonzero exitrun.tskeeps onlyprovider-failure, soagy.tsanddsh.tsreturnmalformedon purpose to get stderr reclassified asunavailable-model; put the exit outcome into the parse contract, or let adapters returnunavailable-modeldirectly.ProviderAdapter.proof,runner/registry/contract.ts: make it{ report: "required"; matches } | { report: "absent" }, then delete the unreachablematchesfunctions incodex.ts,agy.ts,amp.ts,cursor.ts,dsh.tsandopencode.ts.launch.stdinEnvelope,runner/registry/contract.ts: it means something only whenpromptis"stdin"; makeprompta union{ kind: "stdin"; envelope? } | { kind: "file" }.offeredinresolveLane,runner/registry/index.ts: extractofferedEfforts(match, adapter)with one branch perModelMatchkind instead of the nested ternary.FamilyCommon.upstream,runner/registry/family.ts: rename to say it holds Cursor's selector, for examplecursorSelector.unregisteredinadapterSuite,runner/providers/adapter-suite.ts: rename tounregisteredEffort.threadIndex,resolve-codex-transcript.ts: rename the predicate toisThreadsIndex.readPrefix,resolve-codex-transcript.ts:MAX_BYTES + 1is a hidden oversize sentinel thatopeningMessagedepends on; return{ bytes, oversized }or name the probe."Return the marker.\n".repeat(100_000),runner/run.test.ts: name the size whose job is to exceed pipe capacity.fakeDevin,fakeOpencode,fakeDsh,fakeAmp,fakeAgy,fakeCursor,runner/run.test.ts: they splice JS source into generated scripts that depend on names the template declares (args,at,prompt,emit,exportPath,config); build them from one shared stand-in builder with an explicit context.
Constraints whose comments were deleted and that nothing enforces
WriterSandbox,runner/types.ts:full-accesscomes only from the model sheet's opt-in, never as a recovery step.BASE_ALLOWLIST,runner/providers/shared.ts: an allowlist adapter adds only its own prefixes (Grok lanes inherit the parent's full environment, including secrets, now that they have a shell #141).resolveLane,runner/registry/index.ts: no filesystem access.Access,runner/registry/contract.ts: one constructor; the union is unbranded, so nothing stops another.
Repository tooling (.claude/skills/verify-open-pstack/, tests/, .github/)
SetupSnapshot,.claude/skills/verify-open-pstack/scripts/isolation.ts: make it a discriminated union of link entries and file entries.SessionRecord.skills,scripts/types.ts: Claude records names and Codex records names or paths (harness.tsparseSession); normalize Codex paths there, or split intoskillsandskillPaths.classify,scripts/core.ts: move the reflect-resolver regex and the poteto-agent preload special cases intofeatures/registry.json.legacy_model_pins,tests/skill-collision-repro.sh: move the three-stage grep and sed pipeline intorunner/registry.test.ts, or name each stage.browser(),features/recipes.ts: the fallback returns a Chrome path it knows is missing; throwbrowser-missinginprepareinstead.verifyProjectDoctor,features/recipes.ts: replace the emptycatch {}withparseJsonandrealpath(...).catch(() => '').record.commands.some(c => c.includes('pstack-runner')),features/recipes.ts(3 runner recipes): a command-text check that the receipt already proves; delete it or match the installed launcher path.rm(join(f.configHome, 'AGENTS.md'), { force: true }),features/recipes.ts(6 copies): extractremoveCodexMirror(f).omitted,features/recipes.ts(2 copies): extractwithoutOneAliasRole(roles).NEW_FAMILY_LANESandCATALOG_LANES,features/recipes.ts: labeled tuples[sheet: string, rewritten: string]and[sheet: string, dispatched: string]..agents/result.jsonliteral,features/recipes.ts: name it for the Codexworkspace-writeblock, for exampleWORKSPACE_WRITE_BLOCKED_RESULT.- Renames in the verifier:
Catalog.kept→currentByPredecessor,sh→shellQuote,bounded→assertBoundedSetting,mirrored→assertCodexMirror,writer→linkedWorktreeWriter,SETTING→WRITER_SANDBOX_PREFIX,DEFAULT_ROLES→DEFAULT_RUNNER_ROLE(allfeatures/recipes.ts);matches→matchesPathOrSubtree(scripts/core.ts);cleanupFailed→publicationForbidden(scripts/verify.ts);wide→wideReason(scripts/types.ts,scripts/verify.ts). - Setup-last sort comparator,
scripts/harness.ts: name itsetupLast. tests/skill-collision-repro.sh: put the literal@~/.claude/pstack-models.mdin alegacy_importvariable, and namecheck()'s parameters (local label=$1 marker=$2 output=$3).scripts/catalog.test.ts: split the long tests whose negative sub-cases are labeled by comments into namedtest.eachrows.- Planted
cmd.exe,.github/workflows/windows-hooks.yml: put the path in a$plantedCmdvariable. tests/setup-config-home-repro.sh: not swept.features/registry.jsonmaps no owner for it, so any change to it fails live-gate classification closed. Registering it asnonRuntimewould let a change publishlive-gatesuccess unexercised (Unfret on chore(tooling): delete comments from the verifier, tests and repository config (#218) #220). Map its ownership first, then delete its one comment.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity