Repository navigation
socket-patch architecture refactor: real problems only (living document) #2244
Replies: 93 comments
Register[agent] Rendered from Last updated 2026-12-03 · 92 runs under this charter · In flight
Next PR: #2450 and #2413's second point (want a word), #2348 (Cargo, Go, Composer), #2474, #2380, #2387, #2359, #2362, #2360, #2375, #2305, #2308, #2310, #2312, #2314, #2355, #2364, #2367, #2377, #2330, #2332, #2290, #2299, #2327 with #2334, #2318, #2351, #2321, #2286 with #2466 to #2469, #2472, #2477, #2315, #2336, #2337, #2345, #2339, #2349 and #2361. Then #2259, #2294, #2296, #2271, L22, #647, #1917, #1926 with #2465, #1860, #1836, #2306, #2322, #2324, #2328, #2344, #2346, #2356, #2368, #2370, #2371, #2383, #2385, #2401, #2412, #2462, #2486, #2487 and #594 (low), #2319, #2333, #1970, #2363, #2365, #2419, #2421 and #2429 (test only). #2455 after #2453. #2277, #2297, #2309, #2340, #2347, #2366, #2475 and #2480 wait for an answer. Contract sentences for #2393, #2396, #2427, #2453, #2458: after #2459. Merged
Leads
Issues: #1910 fixed in part (#2246, #2261; L22 open); #1014, #1963, #717, #815 closed as false; seven confirmed (in Next PR); 41 more out of charter. All open at 12-03 16:58Z were seen. Areas examined
Notes
|
|
[agent] 2026-11-25: architecture refactor
Chosen
The evidence is PR#2246, ready, awaiting review. Three commits after the start commit:
Leads and issues
Areas examinedThe prune GC ( Lessons
|
|
[agent] 2026-11-25: architecture refactor
Chosen
I found it by running the built binary over five small broken projects and comparing the commands, not from a lead: The evidence is PR#2250, ready, awaiting review. Three commits after the start commit:
Production +143 −80, tests +308 −3, contract +7 −7. Exit codes are unchanged (1). CI passed on Leads and issues
Areas examined
Lessons
|
|
[agent] 2026-11-25: architecture refactor
ChosenNo PR this run. Three PRNone opened. #2246 and #2250 are ready and await review. #2241 is the old charter's test-helper PR and waits for a maintainer. Leads and issues
Areas examined
Lessons
|
|
[agent] 2026-11-25: architecture refactor
ChosenA reviewer's comment on #2250, which step 2 puts ahead of any new work. The PR had two approvals and auto-merge armed, and was not merging 45 minutes later: The comment was right. With the vendor ledger unreadable,
PR#2250, ready and in the merge queue since 21:22Z (approved twice; a maintainer had armed auto-merge). One commit ( No new PR: the review comment was the run. The rest of the time went to leads, each run on Leads and issues
Seen and left: after a revert of a removed or bumped requirement, the pip reinstall advisory says "the restored requirement pins the same version as the patched build". It doesn't there, but following the remedy still leaves a correct environment. Areas examined
Lessons
|
|
[agent] 2026-11-26: architecture refactor
Chosen
Two states, each run with the built binary on Six tests fail on PR#2261, ready and awaiting review, with one check red for a cause outside it (below). Seven commits after the start commit, production +163 −26, tests +481 −15, contract +3 −2:
Nothing new is deleted or reverted: every new branch only reports. Exit codes and Local verification: clippy clean, 1081 CLI unit tests, and the CI on Leads and issues
Seen and left, each with its reason in the PR: on an empty crawl with an unreadable ledger, human mode prints the new warning and then the existing " Areas examined
Lessons
Needs a person
|
|
[agent] 2026-11-26: architecture refactor
ChosenAfter On The same state with real vlt 1.2.0 (a throwaway copy of the So the lock is back on the registry, the patched copy is still installed, a plain PR#2265, ready and awaiting review, with one check red for a cause outside it. CI on Two commits after the start commit, production +25 −11, tests +152 −1, coverage map +3 −1:
Local verification: clippy clean, 1077 CLI unit tests, and the Leads and issues
Areas examined
Lessons
Needs a person
|
|
[agent] 2026-11-26: architecture refactor
ChosenThree Gradle tests named for Two one-line mutations of production code on // core crawlers/maven_crawler.rs: the prefix is ignored for JVM caches
- if let Some(ref custom) = options.global_prefix {
+ if let Some(ref custom) = options.global_prefix.as_ref().filter(|_| false) {
// CLI commands/scan/mod.rs: the user-home note is printed under --global-prefix too
- let mismatch = (!prefixed && (global || gradle_build))
+ let mismatch = ((global || gradle_build) || prefixed)With the first, PR#2267, ready and awaiting review. CI on Two commits after the start commit, test code only, +84 −11 in three files:
With this PR's tests each mutation fails its test, at the One trade-off is in the PR for the reviewer. The note is printed only when the Gradle user home comes from the passwd home, so a scan that prints it reads the account's real Leads and issues
Areas examined
Lessons
Needs a person
|
|
[agent] 2026-11-26: architecture refactor
ChosenNo PR this run. Three routine PRs are open (#2261, #2265, #2267), so step 3 applies: open none and verify up to five leads or issues. All three are I took the issues the register listed to check first (#1926, #1917, #1899), one more whose title claims a drifted duplicate (#1860), and the oldest lead a probe could settle here (L17). Three are confirmed by running the built binary on PRNone opened. #2261, #2265 and #2267 still await review. Their Leads and issues#1917, confirmed. The NuGet crawler tests a project file's extension case-sensitively ( A project whose file is #1926, confirmed for the prune's copy. A crate So a cached blob that says nothing about the copy decides whether the record is kept, and the warning calls a file that was read, and is not the patched one, "still patched (or could not be read to tell)". The cause is #1860, confirmed for
#1899, out of charter. Its drift, the scan and the resolver classifying a store entry's children differently, was fixed by the issue's first slice (#1986): both now go through L17, rejected. A throwaway probe test, not committed, fed four Gemfiles (three shown) to the line scanner behind VEX's source-block reading ( They agree on every block socket-patch writes (an opener, Read, not run.
Areas examined
Lessons
Needs a person
|
|
[agent] 2026-11-26: architecture refactor
ChosenNo PR this run. Three routine PRs are open (#2261, #2265, #2267), so step 3 applies: open none and verify up to five leads or issues. All three are I took the four issues the register listed to check first that a run here could settle (#647, #1064, #882, #1981) and the one lead a file-only fixture could reach (L22). Two are confirmed by running the built binary on PRNone opened. #2261, #2265 and #2267 still await review. Their Leads and issuesL22, confirmed (the last bullet of #1910). Four commands unwire the same vendored Go module in a project that commits its After each of the four, #647, confirmed on
Two rows contradict what is written down. #1064, out of charter. A project with no detectable product, a saved patch, then #882, out of charter. Its dangerous case no longer reaches the Maven rewriter. Since #2052 the hosted engine runs #1981, out of charter (read, not run). Read, not run.
Areas examined
Lessons
Needs a person
|
|
[agent] 2026-11-26: architecture refactor
ChosenNo PR this run. Three routine PRs are open (#2261, #2265, #2267), so step 3 applies: open none and verify up to five leads or issues. All three are I took four issues no run had examined whose titles claim a drift a user could see (#1837, #1858, #1911, #1987) and the lead L27. All five ran against the binary built from PRNone opened. #2261, #2265 and #2267 still await review. Their Leads and issuesNew: L30, filed as #2277, a decision issue. After both, #1911, out of charter. The claim is that the project-patch gate is written five times and that scan's and vendor's copies drifted. Two projects, one with a patch-package file for
The gate held on all 15 runs without consent. What differs is that scan's skip event carries no #1858, out of charter. With #1837, out of charter. #1987, out of charter. Its three drifts concern the notes a successful apply or rollback carries. For the note the issue leads with they are fixed: L27, out of charter. Read, not run.
Areas examined
Lessons
Needs a person
|
|
[agent] 2026-11-26: architecture refactor
ChosenNo PR this run. Three routine PRs are open (#2261, #2265, #2267), so step 3 applies: open none and verify leads or issues. All three are I took four issues no run had examined whose titles claim a drift a user could see (#1836, #705, #905, #594), a fifth beside them (#1835), and the three oldest leads still marked PRNone opened. #2261, #2265 and #2267 still await review. Their Leads and issues#1836, confirmed. Eight runs, eight documents. The lists are the advisory ids of the two options, in the order printed. The same object is built in two other places, and both sort by id: It is the fourth kind as well. The unit test - "vulnerabilities": vulns,
+ "vulnerabilities": vulns.into_iter().take(0).collect::<Vec<_>>(),Two things the issue does not say:
The harm is small: a consumer that compares two runs of the same command sees a difference where nothing changed. The fix is small too: one helper that returns the list sorted by id, used by the three sites, and a test that reads #705, out of charter. The issue counted five UUID grammars. Three are left on
What is left is the grant matcher's wider grammar, over a URL the patch service supplies. #905, out of charter. The one difference is a BOM on #594, out of charter. The private readers the issue lists are gone ( #1835, out of charter. L10, rejected. The warning sinks follow the contract's rule: a
With the 285 runs of 2026-11-25 and the reading of L18, rejected (read). L19, rejected (read). L31, new, out of charter. Areas examined
Lessons
Needs a person
|
|
[agent] 2026-11-26: architecture refactor
ChosenNo PR this run. Three routine PRs are open (#2261, #2265, #2267), so step 3 applies: open none and verify up to five leads or issues. All three are I took five issues that no run under this charter had examined and whose text claims a drift or a defect a user could see: #717, #815, #780, #794 and #675. None passes the gate. Two describe defects that are gone from PRNone opened. #2261, #2265 and #2267 still await review. Their Leads and issues#717, already fixed; closed. The issue says the hosted Maven rewriter and its restore find
The restore tests over the same shapes pass ( #815, already fixed; closed. The issue counts three hand-written rules for the terminator of an inserted line. On #780, out of charter. Vendored mode still scans What is left is three copies that agree. The issue stays open. #794, out of charter. #675, out of charter. The issue says nothing caps
The last run is honest: L32, new, out of charter. That last run exits 0 with Areas examinedAll clean, run with the binary built from
Lessons
#!/usr/bin/env python3
"""mkagent.py <root>: an npm agent-mode fixture with a two-file patch."""
import hashlib, json, os, shutil, sys
root = sys.argv[1]
def gh(b): return hashlib.sha256(b"blob %d\0" % len(b) + b).hexdigest()
shutil.rmtree(root, ignore_errors=True)
pk = os.path.join(root, "node_modules", "left-pad")
os.makedirs(os.path.join(pk, "lib")); os.makedirs(os.path.join(root, ".socket", "blobs"))
before = {"index.js": b"module.exports = 1\n", "lib/util.js": b"exports.u = 1\n"}
after = {"index.js": b"module.exports = 2\n", "lib/util.js": b"exports.u = 2\n"}
open(os.path.join(root, "package.json"), "w").write(
'{"name":"p","version":"1.0.0","dependencies":{"left-pad":"1.3.0"}}\n')
open(os.path.join(pk, "package.json"), "w").write('{"name":"left-pad","version":"1.3.0"}\n')
files = {}
for rel in before:
open(os.path.join(pk, rel), "wb").write(before[rel])
files["package/" + rel] = {"beforeHash": gh(before[rel]), "afterHash": gh(after[rel])}
for b in (before[rel], after[rel]):
open(os.path.join(root, ".socket", "blobs", gh(b)), "wb").write(b)
record = {"uuid": "11111111-2222-4333-8444-555555555555", "exportedAt": "2026-01-01T00:00:00Z",
"files": files, "description": "d", "license": "MIT", "tier": "free",
"vulnerabilities": {"GHSA-aaaa-bbbb-cccc": {"cves": ["CVE-2026-0001"], "summary": "s",
"severity": "high", "description": "d"}}}
json.dump({"patches": {"pkg:npm/left-pad@1.3.0": record}},
open(os.path.join(root, ".socket", "manifest.json"), "w"), indent=2)
Needs a person
|
|
[agent] 2026-11-26: architecture refactor
ChosenNo PR this run. Three routine PRs are open (#2261, #2265, #2267), so step 3 applies: open none and verify up to five leads or issues. All three are I took five issues no run under this charter had examined (#676, #1968, #1925 with #1924, and #1067) and tried L14. None of the five passes the gate. Running #1067 turned up a defect that does, filed as #2286. PRNone opened. #2261, #2265 and #2267 still await review. Leads and issuesNew: L33, filed as #2286. A package manager's global-directory probe that fails is read as "this manager has no global install". For npm, pnpm and yarn the crawler drops a probe that gives no answer, whether the manager is missing, exits non-zero or is still running at the 10 s budget. Bun's probe was taught the difference in #1009 (for #443) and warns. Two results for npm, both run with the binary built from
#1067, out of charter. The issue lists hand-written child deadlines. On #1925 and #1924, out of charter. 28 production sites print an envelope with
#1968, out of charter. The suites now share #676, out of charter. The tracking issue's first child is done: #747, #1867, read. L14, still to verify. I downloaded scala-cli 1.17.1 to see which files it writes beside its Bloop projects. The sandbox's permission check refused to run a downloaded binary, so the lead is where it was; the download is deleted. Areas examined
Lessons
Needs a person
|
|
[agent] 2026-11-26: architecture refactor
ChosenNo PR this run. Three routine PRs are open (#2261, #2265, #2267), so step 3 applies: open none and verify up to five leads or issues. All three are I took four issues no run under this charter had examined (#1114, #748, #595, #1112) and hunted one area none had: what the CLI prints when a project's own files hold a URL with a credential in it. The hunt found a defect that passes the gate, filed as #2287. None of the four issues passes. PRNone opened. #2261, #2265 and #2267 still await review. Leads and issuesNew: L34, filed as #2287. Refusals and hosted warnings print the credentials of a URL they quote from a lockfile. I ran the binary built from
The hosted warnings are in The npm backend shows both ways side by side. With the same git URL in a Clean in these runs: the token in a The fix changes message text only. The issue plans redaction where the text enters each type, as L35, new, out of charter. #748, out of charter. The issue counts purl builders that canonicalize differently. On
What is left of the issue is the builders themselves. #595, out of charter. The project-mode crawl is scoped for the four ecosystems I could run. With one locked package and one unrelated package in the machine cache, #1112, out of charter. #1114, fixed in part. Read, not run. The CI janitor commented today that #2229 fixed the router for a package-less tool lock beside a Areas examined
Lessons
Needs a person
|
|
[agent] 2026-12-02: architecture refactor
Chosen#2287 (lead L34, priority p1): refusals and warnings print the credentials of URLs quoted from a project's files. PR #2445, At the start three routine PRs were open: #2431 and #2441 Evidence on
|
| Pass | Found | Outcome |
|---|---|---|
| 1 (23 minutes) | vex's discovery note still printed the token: note_warning built its RunWarning by hand |
fixed, with a CLI test red on main's binary |
| 1 | redact_urls_in panics on é://…; the new Gradle redaction made every scan of such a build exit 101 where main exits 0 |
fixed |
| 1 | the fallback warning spelled its registry two ways once its cause arrived redacted | fixed: reads as on main |
| 1 | the redactor misses a credential that holds ) or ', and a URL nested in a query (on main) |
filed #2448 |
| 2 (7 minutes) | redact_url panics on x?auth=https://u:p@h; reachable from the Gradle note and the fallback's rewrite |
fixed |
| 2 | the fallback's rewrite could put a query secret back into its cause | fixed |
| 3 (7 minutes) | skipping an overlapping span left its tail (inputs that panicked before) | spans are merged |
| 3 | the JSON lookup redacted by scanning its own message, so a password with ) slipped through |
redacts the URL as one URL |
| 3 | a test asserted before it removed the variable it set | reordered |
| 4 (8 minutes) | no defect in the change; two more gaps of the redactor on main (a query secret with ) in reqwest's own error text, a uuid-shaped package name under a Socket-served base) |
added to #2448 |
| CI on 2041fa6 | coverage (1): three tests of in_process_vendor_bun_takeover, a suite the local runs left out, pinned a bun patch key with its grant token |
the tests expect the redacted key and check the token is gone |
| mine, after CI | run by hand: the human rollback and remove still printed that key on stderr (L140), where --json was now redacted |
redacted in run_hosted_leg; the test runs both without --json |
| 5 (8 minutes) | no defect in the last two commits; the comment in run_hosted_leg names two of the leg's four callers |
left, to keep the head CI ran on; said in the PR |
Leads and issues
- L34 (Refusals and hosted warnings print the credentials of URLs quoted from lockfiles #2287): in PR Stop printing the credentials of URLs quoted from lockfiles in refusals and hosted warnings #2445. Confirmed on
mainat 6280589 for all eight sites of the issue and its comment: five through the binary (Cargo, yarn classic twice, requirements, the Gradle note),vex's note through the binary, the NuGet refusal throughrestore_upstream, and the Poetry warning, the uv refusal and the mirror variables at their constructors. - The URL redactor leaves a credential that holds
)or', and the userinfo of a URL nested in a query #2448, new (bug): the URL redactor leaves a credential that holds)or', and the userinfo of a URL nested in, or listed after, another.ends_urlends a quoted URL at characters RFC 3986 allows in userinfo. Run onmain'sredact.rsbuilt alone:(legacy https://bot:pa)ss@pypi.corp.example/simple)comes back unchanged. A comment adds four more inputs of one rule (a laterscheme://…@in the same run of text). 6,114 of 3,000,000 random strings redact more on a second pass. - L140, confirmed and fixed in Stop printing the credentials of URLs quoted from lockfiles in refusals and hosted warnings #2445: the human
rollbackandremoveprint the grant token of a hosted URL. Both print their hosted leg's warnings on stderr from the leg's own(code, detail)list and build the envelope'sRunWarnings afterwards (CLIcommands/remove.rs,print_run_warnings).redirect_bun_patched_dependency_droppednames apatchedDependencieskey,<name>@<hosted URL>. Run with a probe test over the suite's fixture:TOKEN PRINTED: truefor both commands before the fix; the committed test asserts both lines carry<redacted>. - Seen and not filed:
scan --mode vendored --dry-runsays "Would download and vendor 1 patch" for a Cargo package the wet run refuses withvendor_source_unsupported. The preview's doc lists the refusals it predicts and says the rest are not predicted, so this is as documented.
Areas examined
- A credential in a URL of a project's own files, through
scan,getandvex, and throughrollbackandremovefor a hosted URL in abun patchkey: the evidence above and L140. - Who reads a message after it is built (so that redaction could change behavior): vendored refusals are matched on their code only; the upstream restore keys refusals by uuid; lookup errors are cached and never matched;
RewriteWarnings are compared against lock keys and each other, which is why they stay raw;vexfolds by code. utils/redact.rsunder random strings: 3,000,000 inputs from a hostile alphabet through its five public functions, onmain's copy (484,201 and 16,761 panics) and the branch's (none), and against a reference that cuts the union of the spans (no difference).- Not run: Windows and macOS; the mirror variables and the uv refusal through the binary (they need a hosted pin and a rollback against a live registry); the in-memory engine through the Node addon;
rollbackandremoveover the yarn, Cargo and pip projects (they ran over the Bun fixture).
Lessons
- A redaction added at a constructor sends hostile text through the redactor. Both panics were in a file this PR had not meant to touch, and both passed 8,984 unit tests.
redact.rsuses onlystd, sorustc --teston a copy builds in two seconds and a fuzz loop over it in ten: do that before the first review, for any helper whose callers a change widens. - Take a PR over by its branch, not by its field. The heartbeat was 3 hours 50 minutes old and so was the branch's last push; both agreed. The run that owned it came back half an hour later and stood down because the status block had moved.
- Redact where a message is reported when something still compares it.
yarn_rewriter_namedlooks for a lock key in a rewriter's warning. A redaction at the 264RewriteWarningliterals would have changed that answer; the three places where warnings leave the engine did not. - A reviewer's second and third passes found what the first fix added. The fallback rewrite written for pass 1's nit un-redacted a query secret (pass 2); the skip written for pass 2's panic left a tail (pass 3). Each was a few lines and each was wrong in a way a probe showed in seconds. Give every pass the delta, and ask for the property (no panic, no surviving mark), not for a reading.
- Run every suite that reads the text a message change touches. I ran 33 suites chosen by name and left out
in_process_vendor_bun_takeover, where three tests pinned a key that holds a hosted URL. CI found them in four minutes.grep -rln "contains(&key)\|HOSTED_URL" tests/would have named the suite before the first push; better, runcargo test -p socket-patch-cli --no-fail-fastonce in the background while the review runs. - A failing test can be the lead. Those three tests showed which messages quote a hosted URL, and that led to the stderr line the
--jsonassertion could not see. When a constructor redacts for the envelope, run the same command without--json. - CI's heavy jobs do not run on a draft. 48 of 54 checks were skipped until the PR was marked ready, so the CI wait starts at the hand-off.
- A test binary runs against whatever sits at
target/debug/socket-patch. Copyingmain's saved binary there and running the test executable directly gave the red run of the whole matrix without a second checkout. - The run: loading state and the takeover 6 minutes, reading where each message type is built 14, the failing tests and the first fix 20, the suites and the first review 25, three rounds of review fixes with their re-runs 45, the hand-off and CI's finding with its two fixes 20, CI again and the ledger the rest.
Needs a person
- Review Stop printing the credentials of URLs quoted from lockfiles in refusals and hosted warnings #2445 (a printed credential, p1), Stop attesting a vendored pnpm package through an override its pnpm 10 release does not read #2441 (false
not_affected, p1) and Scope a Go workspace's scan to the modules it builds, not the machine's module cache #2431. Three routine PRs are open, so the next runs open none. - Cursor Bugbot is paused ("on-demand spend limit reached"), so Stop printing the credentials of URLs quoted from lockfiles in refusals and hosted warnings #2445 has no Bugbot review, and the next PRs will have none until the limit is raised.
- One check on Stop printing the credentials of URLs quoted from lockfiles in refusals and hosted warnings #2445 was still running when this entry was written: the Windows nokogiri job. The other 113 are green or skipped.
- The URL redactor leaves a credential that holds
)or', and the userinfo of a URL nested in a query #2448 is new: the redactor still prints a credential that holds)or', or one in a URL nested in or listed after another. It is onmainfor every redacted message. - Stop printing the credentials of URLs quoted from lockfiles in refusals and hosted warnings #2445 does not reach every warning. About forty
RunWarningliterals and the stderr linesgetand the vendored legs print from(code, detail)pairs do not pass a constructor; most of the literals are incommands/vendor.rs, which Fix a vendored platform gem moving when its lead platform leaves the lock (#2435) #2442 holds. A comment on Refusals and hosted warnings print the credentials of URLs quoted from lockfiles #2287 lists them. - Stop printing the credentials of URLs quoted from lockfiles in refusals and hosted warnings #2445 changes three pinned messages: a
bun patchkey is named with its grant token redacted. Its description says so under "Behavior change". - One commit body line on Stop printing the credentials of URLs quoted from lockfiles in refusals and hosted warnings #2445 is 73 columns (2041fa6, a quoted input). The branch cannot be rewritten.
- From earlier runs, unchanged: After
dotnet restore --force-evaluateover a global packages folder that holds the upstream copy,vendor --checkandvexcall a vendored NuGet package patched while the build loads the upstream assembly: neither reads the lock's contentHash #2381 waits for Fix a vendored platform gem moving when its lead platform leaves the lock (#2435) #2442, Under aGOWORKthat names another file,vexreadsgo.work.sumand never the<file>.sumgo uses: it refuses a hosted Go pin go builds, and attests from a sum file go does not read #2439 after Scope a Go workspace's scan to the modules it builds, not the machine's module cache #2431,scan --mode agentfails on, and records, Go modules the project does not build: every module in the machine's module cache under ago.work, and the old version ago getupgrade leaves in go.sum;applyorapply --checkthen exits 1 in CI #2413's second point wants a word, and A 403 or 401 from a host that is not the patch service (a web filter's block page, a WAF) is reported as "this patch needs a paid plan" or "invalid API token": get exits 0, and a scan with a token drops to the free patches #2366, Decide: a vendored Maven project cannot be built from a checkout path with a bare%(Maven 3.9.11:Invalid artifact repository), and from a%XXpath only through the 3.9.2 tail #2347, Decide: a build that reuses webpack's persistent cache (Next.js's .next/cache) still ships the unpatched package after a patch, while apply, vendor --check and vex call it patched: invalidate the cache, warn, or document? #2340, Decide: should a uv project read its own .venv when a different virtualenv is activated, as uv does? Today the activated one is patched and the project is reported as patched #2309, Decide: what rollback owes a package when a file of its patch is missing on disk, the state apply --force leaves #2277 and Decide: should socket.yml refuse a bare package name with a version (lodash@4.17.20), as the selection filter does? #2297 wait for an answer.
|
[agent] 2026-12-02: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start: #2431 and #2441 No lead was marked One defect on PRNone opened. #2431, #2441 and #2445 await review. No code was pushed anywhere. Leads and issuesL141, confirmed, filed #2450 ( Real Yarn 4.12.0, one project with
In both vendored states The same two commands on the other four npm-family backends in vendored mode, each with its real tool (npm 10.9.9, pnpm 10.28, Yarn 1.22.22, Bun): the dependent gets 0.0.3, and the version change installs 1.2.0 with Two things
The planned fix scopes the selector as hosted mode does. The trade is in the issue: a later range of the same release ( L142, rejected: the vendored checksum of a scoped package, and of a package with empty files, a
L143, rejected: a vendored patch of a transitive package. No issue closed. No lead is marked Areas examined
Lessons
Needs a person
|
|
[agent] 2026-12-02: architecture refactor
Chosen#2381 (lead L106, priority p3): after At the start three routine PRs were open and
It is a drifted rule: the writer treats a lock that pins other bytes as out of sync and pins it again, and neither command whose job is to check read the pin. The same hole was closed for Bun's lock alone (#2120). Evidence on
|
| Pass | Found | Outcome |
|---|---|---|
| 1 | the remedy named socket-patch vendor, which does nothing in a project with no manifest (exit 0, "No manifest to vendor from") |
fixed: it leads with scan --mode vendored |
| 1 | vendor --check ran the pin check before the liveness rule: the pin's text where vex said vendor_unwired |
fixed, with a CLI test that holds both to one answer |
| 1 | the dry-run tally walked the tree for every NuGet package and still said "already vendored" with the config put back | fixed with the reviewer's smaller rule, which reads nothing |
| 1 | pin_stale was wider than the check; the check hashed any path the ledger named; a dead trim; a module loaded twice |
fixed |
| 1 | vex --no-verify attests over a stale pin (Bun too); the re-pin needs the patch service; the scan and get previews go by the ledger's uuid; conflicting pins in one lock |
not in this PR; filed #2455. The first two were run again here on the real-SDK tree |
| 1 | the contract still says "vendor_lock_pin_mismatch (bun)" |
waits for #2451, which holds CLI_CONTRACT.md |
| 2 | the production change is sound; three assertions could not fail for their reason | fixed; the path guard's test was checked by removing the guard |
Leads and issues
- L106 (After
dotnet restore --force-evaluateover a global packages folder that holds the upstream copy,vendor --checkandvexcall a vendored NuGet package patched while the build loads the upstream assembly: neither reads the lock's contentHash #2381): in PR Stop verifying and attesting a vendored NuGet package whose lock pins other bytes #2453. Confirmed again onmainat 6eb4eb9 with SDK 8 and with the fixture test. - L137, L121, L34, L140: fixed. Scope a Go workspace's scan to the modules it builds, not the machine's module cache #2431, Stop attesting a vendored pnpm package through an override its pnpm 10 release does not read #2441 and Stop printing the credentials of URLs quoted from lockfiles in refusals and hosted warnings #2445 merged (15:05Z, 15:02Z, 15:18Z).
- L144, out of charter: a vendored Cargo patch makes
cargo addof a dependent that needs a newer compatible release fail to resolve. cargo 1.93.1,itoa1.0.5 vendored under the requirement1.0, a path crate that asks foritoa = "1.0.10": "failed to select a version foritoa… all possible versions conflict with previously selected packages", naming the copy under.socket/vendor/cargo/. It is cargo's rule for a[patch]entry that satisfies the requirement, it is loud, and it names the vendored copy. Hosted mode resolves a second copy from crates.io instead andvexwithholds (vex_cargo_unpinned_declaration, by the contract). Not filed. - L145, new, filed
vex --no-verifyattests a vendored NuGet or Bun package whose lock pins other bytes, and a stale NuGet pin is pinned again only with the patch service reachable #2455 (bug): what Stop verifying and attesting a vendored NuGet package whose lock pins other bytes #2453 leaves.vex --no-verifyattests a vendored NuGet package whose lock pins other bytes (ran with SDK 8: omitted without the flag,not_affectedwith it; the contract says the wiring gates apply either way and calls a pin mismatch a wiring failure).SOCKET_OFFLINE=1 socket-patch vendorover a stale pin exits 1 and leaves the lock, though the committed nupkg is intact (ran). Three more points are in it as read, not run. - No issue closed. No lead is marked
to verify. Every openarch-auditissue newer than the last sweep is one of this routine's own.
Areas examined
- Vendored Cargo under everyday commands (cargo 1.93.1, a consumer locked to
itoa1.0.5 with 1.0.19 published, the binary of 6280589, the fixture service held open):cargo updatekeeps the vendored copy ("Locking 0 packages"), and so doescargo update itoa --precise 1.0.15, which prints a move from the copy to itself.cargo add itoa@1.0.15moves the lock to the registry's 1.0.19 with cargo's "patch … was not used in the crate graph";vendor --checkthen exits 1 ("wiring missing") andvexomits the package (vendor_unwired). A dependent that needs a newer compatible release is L144. All as the contract says, or cargo's own. - Agent-mode jar patching and Composer's source installs (read, not run): the multi-release and signed-jar rules, and
preferred-install, are each stated in the module and in the contract with the cases this run thought of. Nothing to run. - A vendored NuGet lock after
--force-evaluate: the evidence above. - Not run: SDK 10, Windows and macOS; hosted NuGet after
--force-evaluate; a rules_csharp hub; the hosted Cargo registry undercargo update(it needs the stand-in registry).
Lessons
- Re-check the open PRs a few minutes into a run that starts at the limit. Three approved PRs merged between 15:02Z and 15:18Z. A run that had only read them at 14:57Z would have spent itself on a hunt while the queue's head was free.
- Follow the remedy you print, with the real tool, to the end. The first cut told the user to delete "the directory its warning names", and the run it sent them to raised no such warning. I found that only by doing what the message said with SDK 8. The reviewer then ran the same remedy in a project with no manifest, where
vendordoes nothing, and offline, where it fails. - When a backend already says "in sync" on a dry run, its
verifiedpreview needs no second opinion. My first dry-run fix asked the pin check from the tally. The reviewer's rule (a NuGetverifiedpreview is never in sync) is one condition, reads nothing, and also covers the config put back. - A check added beside a liveness rule goes after it. Before it, a tree with no wiring left got the pin's sentence, and two commands disagreed on why.
- An assertion on "nothing happens" needs the thing to be there. The row for a path outside the root named an empty place, so it passed with the guard removed. Put the file there, then remove the guard once.
- A file another agent's PR holds can free itself mid-run. Stop printing the credentials of URLs quoted from lockfiles in refusals and hosted warnings #2445 merged while the fix was being written, so
vex's sentence went in on a merge ofmain. Fix vendored gem directories losing files git ignores (#2348) #2451 did not, so the contract sentence is owed. .NETby hand takes ten minutes here.docker pull mcr.microsoft.com/dotnet/sdk:8.0, the work directory mounted at its own path,--network none,NUGET_PACKAGESandHOMEinside it, a folder feed filled bydotnet pack. The vendor service is the ignored test that holdsServer::project_with_envopen, withNUGET_PACKAGEShanded over.- A wait loop on a cargo log matches
^ *Finished.erroris in crate names. - The CI that counts starts minutes after
ready_for_review. The push'ssynchronizerun arrived at 16:25Z with a draft payload and skipped everything,ci-okgreen; the real run was created at 16:32Z, seven and a half minutes after the PR was marked ready.ci-watch.shsaidDONE checks pass (51 checks)in between. Before believing a green, look forrelease-readinessorclippyamong the jobs that ran. - The run: loading state 6 minutes, the Cargo hunt and two read-only areas 9, the choice and the failing test 6, the first fix 8, the real-SDK runs 15 (beside the builds), the review's two passes 32 (beside verification), its fixes 15, the hand-off 5, CI and the ledger the rest.
Needs a person
- Review Stop verifying and attesting a vendored NuGet package whose lock pins other bytes #2453 (a false
not_affectedand a falsevendor --checkpass for vendored NuGet, p3). It is the only routine PR open. vex --no-verifyattests a vendored NuGet or Bun package whose lock pins other bytes, and a stale NuGet pin is pinned again only with the patch service reachable #2455 is new:vex --no-verifyattests a vendored NuGet or Bun package whose lock pins other bytes, and a stale NuGet pin is pinned again only with the patch service reachable. A word on the warning code for a pin redone from the committed nupkg would help (vendor_artifact_rebuiltwould no longer be true;vendor_artifact_reusedis PyPI's).- The contract sentence for Stop verifying and attesting a vendored NuGet package whose lock pins other bytes #2453 is owed:
CLI_CONTRACT.mdsays "vendor_lock_pin_mismatch(bun)". It waits for Fix vendored gem directories losing files git ignores (#2348) #2451. - Cursor Bugbot had not finished on Stop verifying and attesting a vendored NuGet package whose lock pins other bytes #2453 when this entry was written (17 minutes in). Its findings, if any, are the PR shepherd's or the next run's.
- From earlier runs, unchanged: Under a
GOWORKthat names another file,vexreadsgo.work.sumand never the<file>.sumgo uses: it refuses a hosted Go pin go builds, and attests from a sum file go does not read #2439 is free now (Scope a Go workspace's scan to the modules it builds, not the machine's module cache #2431 merged), A vendored Yarn berry patch pins every version of its package: a dependency added later on another version silently gets the vendored release, andyarn upof the package installs nothing new, whilevendor --checkpasses #2450 andscan --mode agentfails on, and records, Go modules the project does not build: every module in the machine's module cache under ago.work, and the old version ago getupgrade leaves in go.sum;applyorapply --checkthen exits 1 in CI #2413's second point want a word, and A 403 or 401 from a host that is not the patch service (a web filter's block page, a WAF) is reported as "this patch needs a paid plan" or "invalid API token": get exits 0, and a scan with a token drops to the free patches #2366, Decide: a vendored Maven project cannot be built from a checkout path with a bare%(Maven 3.9.11:Invalid artifact repository), and from a%XXpath only through the 3.9.2 tail #2347, Decide: a build that reuses webpack's persistent cache (Next.js's .next/cache) still ships the unpatched package after a patch, while apply, vendor --check and vex call it patched: invalidate the cache, warn, or document? #2340, Decide: should a uv project read its own .venv when a different virtualenv is activated, as uv does? Today the activated one is patched and the project is reported as patched #2309, Decide: what rollback owes a package when a file of its patch is missing on disk, the state apply --force leaves #2277 and Decide: should socket.yml refuse a bare package name with a version (lodash@4.17.20), as the selection filter does? #2297 wait for an answer.
|
[agent] 2026-12-02: architecture refactor
Chosen#2439 (lead L136, priority p2): under a One routine PR was open at the start (#2453, Evidence on
|
| Found | Outcome |
|---|---|
no defect in the production change; every reader of the workspace's sum file is right with GOWORK naming ci.work, naming a go.work elsewhere, and unset; none missed |
— |
the helper against real go: .. segments, a symlinked work file (the sum file beside the link), a trailing separator (go refuses it; the workspace is invalid here), a non-UTF-8 name |
all as go |
| both tests fail with the fix removed; the CLI test stopped at its first wrong row | fixed: it names every wrong row |
| no test covers the hosted engine's line (reverted or removed, every test passes); no wrong outcome could be built from it | not changed; said in the PR |
that list never declares the work file an absolute GOWORK names, where vex's probes do (read) |
L146, to verify |
two sentences still said "the governing go.work.sum" |
the doc comment is fixed; the contract waits for #2459 |
Leads and issues
- L136 (Under a
GOWORKthat names another file,vexreadsgo.work.sumand never the<file>.sumgo uses: it refuses a hosted Go pin go builds, and attests from a sum file go does not read #2439): in PR Read the sum file go reads under a GOWORK that names another work file #2458. Confirmed again onmainat 7beca2f, with the two go runs above. - L146, new, to verify: the hosted engine tells a tracked snapshot which Go files it read outside the view, and that list has
go.workin the root and its ancestors but not the work file an absoluteGOWORKnames.vex'sworkspace_probeshas it. Read, not run. The read set is asked whether a discovery made earlier in the same run still describes the project (CLIcommands/context.rs), and no mode writes a work file that is not the root'sgo.work, so I do not expect a wrong outcome; a later run should tryscan --mode hostedwith the file changed between the discovery and its reuse before rejecting it. - No issue closed, none filed.
Areas examined
- A named
GOWORK's sum file (go 1.24.7, the binary of 7beca2f): the evidence above. Read for the same input, not run: the undo (rollback,remove) looks for the Socket module's sum lines ingo.sumandgo.work.sum, so lines go appended to aci.work.sumstay; go tolerates them. The loader reads a sum file it cannot read as absent, where go refuses to build; with the pin ingo.sumvexthen attests a build go refuses, which is no build at all. - Not run: Windows and macOS; go releases other than 1.24.7; a real Socket module under go.
Lessons
- A file go does not read pins nothing, and one run shows it. Put a wrong
h1:for the replacement module in each sum file in turn: go stops with "checksum mismatch" for the file it reads and builds through the other. That turned two rows the issue had "as go's rule" into runs, and it needs no Socket module: any module the file proxy serves stands in. - Say what the row shows, not what go does. My first CLI test said go "does not build" a pin whose zip line is only in
go.work.sum. go builds: it downloads and records the line where it reads. The row's point is that nothing binds the bytes. - A reviewer that builds beside you costs more than its build. Its
cargo testran in the main checkout once (the review skill did it, against the brief), and a process was killed for memory during one of my builds. My full core run, started while the reviewer was still running tests, then sat on fourpatch::redirect::upstreamtests until I stopped it twelve minutes in; I did not establish why, and the 52 tests of those modules pass alone in two seconds. Give the reviewer its own worktree and say so twice; when a full run stalls on tests nowhere near the change, skip those modules, finish, and run them alone. - A restart mid-run loses the hour, not the work. The claim, the branch and the draft PR were on GitHub; the test was in the working tree. The heartbeat was 70 minutes old when the run came back, twenty short of a takeover by the next run. Push a heartbeat before a long build.
- A job that ends ten minutes to the second after its start, with no failed step, lost its runner. Read the job's annotation (
check-runs/<id>/annotations) before its log, which is not there yet; a workflow run takesrerun-failed-jobsonly once it has completed, so wait for it. The re-run ofe2e-buildreleased thirteen e2e legs that had not run at all: a green before it would have been short of them. - Guess a skip code and the test tells you. The rows that must not attest exit 1 with
package_not_found(no pin, nothing installed), not a code about the sum file. Run the row once before writing the expectation. - The run: loading state 4 minutes, the choice and the failing test on
main5, the claim and the draft PR 2, (the restart 68), the fix and the unit test 5, the CLI test red and green 13, the review 20 beside verification, verification 22, the register's size 8, the hand-off and CI the rest.
Needs a person
- Review Read the sum file go reads under a GOWORK that names another work file #2458 (a false
not_affectedand a refusal for Go workspaces under a namedGOWORK, p2) and Stop verifying and attesting a vendored NuGet package whose lock pins other bytes #2453 (vendored NuGet, p3). A later run has Stop printing a credential the URL redactor ends before, or behind another URL #2461 open as a draft (seen at 19:06Z), so three routine PRs are open. - The contract sentences for Stop verifying and attesting a vendored NuGet package whose lock pins other bytes #2453 and Read the sum file go reads under a GOWORK that names another work file #2458 are owed; both wait for Fix agent mode reading gemrc gem directories Ruby does not load (#2317) #2459, which holds
CLI_CONTRACT.mdnow that Fix vendored gem directories losing files git ignores (#2348) #2451 has merged. - From earlier runs, unchanged: A vendored Yarn berry patch pins every version of its package: a dependency added later on another version silently gets the vendored release, and
yarn upof the package installs nothing new, whilevendor --checkpasses #2450 andscan --mode agentfails on, and records, Go modules the project does not build: every module in the machine's module cache under ago.work, and the old version ago getupgrade leaves in go.sum;applyorapply --checkthen exits 1 in CI #2413's second point want a word,vex --no-verifyattests a vendored NuGet or Bun package whose lock pins other bytes, and a stale NuGet pin is pinned again only with the patch service reachable #2455 wants a word on the warning code, and A 403 or 401 from a host that is not the patch service (a web filter's block page, a WAF) is reported as "this patch needs a paid plan" or "invalid API token": get exits 0, and a scan with a token drops to the free patches #2366, Decide: a vendored Maven project cannot be built from a checkout path with a bare%(Maven 3.9.11:Invalid artifact repository), and from a%XXpath only through the 3.9.2 tail #2347, Decide: a build that reuses webpack's persistent cache (Next.js's .next/cache) still ships the unpatched package after a patch, while apply, vendor --check and vex call it patched: invalidate the cache, warn, or document? #2340, Decide: should a uv project read its own .venv when a different virtualenv is activated, as uv does? Today the activated one is patched and the project is reported as patched #2309, Decide: what rollback owes a package when a file of its patch is missing on disk, the state apply --force leaves #2277 and Decide: should socket.yml refuse a bare package name with a version (lodash@4.17.20), as the selection filter does? #2297 wait for an answer.
|
[agent] 2026-12-02: architecture refactor
Chosen#2448 (priority p1): the URL redactor still prints a credential it ends before, or that sits behind another URL. PR #2461, Two routine PRs were open at the start: #2453, It is a mechanism bug users can see: the one function every message goes through decided where a quoted URL ends before it looked for the credential, and read the first authority only. Evidence on
|
| Found | Outcome |
|---|---|
no realistic input where main hides a credential and the branch prints it; none for redact_url in 17,000,000 cases; no panic; linear |
— |
a grant token missed in a URL that is now nested where main read it alone: its path was cut at an & or at the next :// |
fixed: three readings, in runs that do not overlap. Its fuzz: 208 hits per 3,000,000 before, 35 after |
the registry download, the Maven fetch and utils/http.rs still printed a secret query value that holds ) |
fixed: each names its URL through redact_url; two tests carry such a value |
network_error_detail replaced the URL as a substring |
fixed: it replaces (<url>), as reqwest writes it |
reading a fragment's own pairs redacted what is no secret (#/auth/callback?state=abc, #key=value, a padded integrity fragment) |
fixed: a fragment's pairs are not read; a ? behind the # starts a query. That rule was mine, added to close a fuzz class |
| three rules and two claims could be removed with every test green | fixed: nine rows added; 12 mutants, one per rule, each fail the test that names it |
| a doc comment and a test name said more than the code | fixed |
text that is no credential is redacted in two shapes (a path-less URL closed by ' or ) with an @ behind it; a path-less nested URL before a pair with an @) |
not changed, and said in the PR with examples: the narrower rules it tried bring back a printed credential |
on main too: a secret after a comma-joined URL list inside a query is printed in text |
not changed; on the issue |
My first fix for its fragment finding restarted a pair's name at every ?; its fuzzer, run on that, showed main reading Key?=… whole where the branch no longer did. The name now starts after the first ?.
Leads and issues
- The URL redactor leaves a credential that holds
)or', and the userinfo of a URL nested in a query #2448: in PR Stop printing a credential the URL redactor ends before, or behind another URL #2461. Every input of the issue confirmed again onmainat 7beca2f. A comment on the issue lists what the PR fixes and what it leaves. - Left by Stop printing a credential the URL redactor ends before, or behind another URL #2461 (on the issue, none run through a package manager):
/patch/view/<uuid>still shows a redacted level (cosmetic; changing it would show whatmainhides); the comma-list-in-a-query case above; a percent-encoded nested URL is not decoded; a userinfo with a character RFC 3986 does not allow as it is still ends there;strip_url_userinforeads the first authority only; other callers that put a raw URL into a message and scan it afterwards were not looked for beyond the four fixed. - L146 was not looked at (still
to verify). - No issue closed, none filed.
Areas examined
utils/redact.rsand who calls it: the evidence above. Of the 10,898 lines ofmainthat hold a://, the two copies differ on one, a test string whose password holds)and'. Read for a caller that compares a redacted text instead of showing it: the npm fallback's rewrite (patch/redirect/upstream/npm.rs) replacesredact_url(configured)inside a text thatredact_urls_inmade, so the two forms of one URL have to agree, and do.- Not run: Windows and macOS; a package manager that writes such a URL (the projects are file-only); a patch server on an IPv6 address through the binary; the Maven fetch's new error text against a real mirror.
Lessons
- Fuzz the old copy against the new one for what only the old one hides, byte for byte. A copy of each file with
replace_spanswriting one marker byte per hidden byte keeps input and output the same length, so "a bytemainhides and the branch shows" is onezip. It turned "it redacts more" into a number, and it showed that splitting a list at;showed textmainhid, which I then took out. - Two generators find what one does not. Mine built messages from URL parts and found nothing left; the reviewer's token soup found a path cut at
&and at a second://. Ask the reviewer to write its own generator, and run yours on its fixes and its on yours. - A rule added to close a fuzz class needs its own harm check. Reading a fragment like a query closed "a later URL's query sits behind an earlier
#", and redactedstatein a route. The reviewer's benign-text run found it; I had only fuzzed for leaks. Fuzz text that holds no credential too, and count what changes. - When extents get longer, every per-URL rule of the old code has to be run on the pieces as well as on the whole. Stepping over a userinfo merges what were two URLs. The first authority, the first
?and the last uuid all meant something else afterwards. The fix that held was "read each://as the old code read a whole URL", in runs that do not overlap so it stays linear. - The scan for a URL's end was quadratic on
main(a scan to the end of the text for every list element). Time hostile inputs of 200 KB before and after any change to a scanner; one of my cuts was quadratic for ten minutes. - One core test build at a time. Two at once (a red run in a worktree beside the main checkout) had a process killed for memory. The reviewer's
/code-reviewskill also started acargo testin the main checkout, against the brief, and sat on the build lock; I stopped it. This is the second run in a row it happened. nohupbreakse2e_safety_lock: its SIGHUP test waits forever, because the child inherits the ignored signal. Run the CLI set from a background shell without it.- The reviewer took 55 minutes and would have gone on. It was fuzzing fixes of its own. Ask for findings at a set time, and ask for unfinished ones to be marked.
- A test file another PR holds can still give the evidence. The CLI proof is a copy of
tests/scan/quoted_url_credentials.rswith another token, run and deleted; Give the pip case of the quoted-URL credential test its own venv, so it passes off Ubuntu #2457 changes that file, so no CLI test is committed. - The CI that counts can start with the hand-off. This time the run with
clippyandrelease-readinesswas created nine seconds afterready_for_reviewand was green ten minutes later, where the last PR's started seven minutes after. Still read the job list before believing aDONE. - The run: loading state 5 minutes, the choice and the claim 3, the first fix with the fuzz harness 20, the unit tests and the red run 10, the CLI proof and the suites 15 (beside the review), the review 55, its fixes with both fuzzers 20, verification and the hand-off 10, CI and the ledger the rest.
Needs a person
- Review Stop printing a credential the URL redactor ends before, or behind another URL #2461 (a printed credential, p1), Read the sum file go reads under a GOWORK that names another work file #2458 (Go workspaces, p2) and Stop verifying and attesting a vendored NuGet package whose lock pins other bytes #2453 (vendored NuGet, p3). Three routine PRs are open, so the next runs open none until one merges.
- Stop printing a credential the URL redactor ends before, or behind another URL #2461 changes message text in two ways a reviewer may want to weigh: text that is no credential is redacted in two rare shapes (examples in the PR), and a failed Maven fetch now names its cause chain.
- From earlier runs, unchanged: the contract sentences for Stop verifying and attesting a vendored NuGet package whose lock pins other bytes #2453 and Read the sum file go reads under a GOWORK that names another work file #2458 wait for Fix agent mode reading gemrc gem directories Ruby does not load (#2317) #2459; A vendored Yarn berry patch pins every version of its package: a dependency added later on another version silently gets the vendored release, and
yarn upof the package installs nothing new, whilevendor --checkpasses #2450 andscan --mode agentfails on, and records, Go modules the project does not build: every module in the machine's module cache under ago.work, and the old version ago getupgrade leaves in go.sum;applyorapply --checkthen exits 1 in CI #2413's second point want a word;vex --no-verifyattests a vendored NuGet or Bun package whose lock pins other bytes, and a stale NuGet pin is pinned again only with the patch service reachable #2455 wants a word on the warning code; A 403 or 401 from a host that is not the patch service (a web filter's block page, a WAF) is reported as "this patch needs a paid plan" or "invalid API token": get exits 0, and a scan with a token drops to the free patches #2366, Decide: a vendored Maven project cannot be built from a checkout path with a bare%(Maven 3.9.11:Invalid artifact repository), and from a%XXpath only through the 3.9.2 tail #2347, Decide: a build that reuses webpack's persistent cache (Next.js's .next/cache) still ships the unpatched package after a patch, while apply, vendor --check and vex call it patched: invalidate the cache, warn, or document? #2340, Decide: should a uv project read its own .venv when a different virtualenv is activated, as uv does? Today the activated one is patched and the project is reported as patched #2309, Decide: what rollback owes a package when a file of its patch is missing on disk, the state apply --force leaves #2277 and Decide: should socket.yml refuse a bare package name with a version (lodash@4.17.20), as the selection filter does? #2297 wait for an answer.
|
[agent] 2026-12-02: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start: #2453 and #2458 One lead was marked One defect on PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL146, rejected: the hosted engine's list of the Go files it read outside the view lacks the work file an absolute
L147, confirmed, filed #2462 ( The binary of a95f10c, the repository's stand-in patch API, and a directory outside any git checkout with three copies of the fixture project (
Not affected: a bare scan inside a git checkout, which finds every project directory and scans each. A The planned fix asks the nested No issue closed. No lead is marked Areas examined
Lessons
Needs a person
|
|
[agent] 2026-12-02: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 23:21Z: #2453, #2458 and #2461, each No lead was marked Two defects on PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL148, confirmed, filed #2465 ( The binary of a95f10c, files only, a global npm install at a temp prefix holding
Every run exits 0. The fix was tried and not pushed: skipping an entry with unchanged content in L149, confirmed, filed #2466 (
Afterwards #2348, confirmed again on No issue closed. No lead is marked Areas examined
Lessons
#!/usr/bin/env python3
"""mk2.py <npm|gem|pypi> <dir> <spec.json>: one installed package and .socket/manifest.json.
spec: {"files": {rel: {"before": str|null, "after": str, "mode": str|null,
"installed": "before"|"after"|"absent"|<text>, "fsmode": "666"}}, "noblobs": bool}"""
import base64, hashlib, json, os, sys, shutil
def gh(b): return hashlib.sha256(b"blob %d\0" % len(b) + b).hexdigest()
eco, d, spec = sys.argv[1], sys.argv[2], json.load(open(sys.argv[3]))
shutil.rmtree(d, ignore_errors=True)
os.makedirs(os.path.join(d, ".socket", "blobs"))
if eco == "npm":
pkg = os.path.join(d, "node_modules", "left-pad"); prefix = "package/"; purl = "pkg:npm/left-pad@1.3.0"
os.makedirs(pkg)
json.dump({"name": "app", "version": "1.0.0", "dependencies": {"left-pad": "1.3.0"}}, open(os.path.join(d, "package.json"), "w"))
json.dump({"name": "left-pad", "version": "1.3.0"}, open(os.path.join(pkg, "package.json"), "w"))
elif eco == "gem":
home = os.path.join(d, "vendor/bundle/ruby/3.2.0"); pkg = os.path.join(home, "gems", "octopoller-0.2.0"); prefix = ""; purl = "pkg:gem/octopoller@0.2.0"
os.makedirs(os.path.join(pkg, "lib")); os.makedirs(os.path.join(home, "specifications"))
open(os.path.join(home, "specifications", "octopoller-0.2.0.gemspec"), "w").write("# installed spec\n")
elif eco == "pypi":
sp = os.path.join(d, ".venv/lib/python3.12/site-packages"); pkg = sp; prefix = ""; purl = "pkg:pypi/six@1.16.0"
os.makedirs(os.path.join(sp, "six-1.16.0.dist-info"))
open(os.path.join(d, ".venv", "pyvenv.cfg"), "w").write("home = /usr/bin\nversion = 3.12.3\n")
open(os.path.join(sp, "six-1.16.0.dist-info", "METADATA"), "w").write("Metadata-Version: 2.1\nName: six\nVersion: 1.16.0\n")
files = {}
for rel, f in spec["files"].items():
b = None if f["before"] is None else f["before"].encode(); a = f["after"].encode()
e = {"beforeHash": "" if b is None else gh(b), "afterHash": gh(a)}
if f.get("mode") is not None: e["mode"] = f["mode"]
files[prefix + rel] = e
if not spec.get("noblobs"):
for blob in (b, a):
if blob is not None: open(os.path.join(d, ".socket", "blobs", gh(blob)), "wb").write(blob)
inst = f.get("installed", "before")
content = b if inst == "before" else a if inst == "after" else inst.encode()
p = os.path.join(pkg, rel); os.makedirs(os.path.dirname(p), exist_ok=True)
if inst != "absent":
open(p, "wb").write(content); os.chmod(p, int(f.get("fsmode", "644"), 8))
m = {"patches": {purl: {"uuid": "11111111-1111-4111-8111-111111111111", "exportedAt": "2026-01-01T00:00:00Z", "files": files,
"vulnerabilities": {"GHSA-aaaa-bbbb-cccc": {"cves": ["CVE-2026-0001"], "summary": "s", "severity": "high", "description": "d"}},
"description": "fix", "license": "MIT", "tier": "free"}}}
json.dump(m, open(os.path.join(d, ".socket", "manifest.json"), "w"), indent=2)For a real install, build the manifest from the installed file instead ( Needs a person
|
|
[agent] 2026-12-03: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 01:21Z: #2453, #2458 and #2461, each No lead was marked Three defects on PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL150, confirmed, filed #2467 ( The fixtures of
Between the L151, confirmed, filed #2468 ( The binary of d987721, a stand-in patch API, a project with
Afterwards L152, confirmed, filed #2469 (
A failing test in The NuGet advisories of #2416, through the binary: clean. A hand-built restored project ( No issue closed. No lead is marked Areas examined
Lessons
#!/usr/bin/env python3
"""mkscopes.py <w>: a project (ms 2.0.0) and a global npm prefix (left-pad 1.3.0), plus catalog.json for api.py.
Run: env -i PATH HOME=<w>/home npm_config_prefix=<w>/gprefix SOCKET_PROXY_URL=http://127.0.0.1:<port>
SOCKET_TELEMETRY_DISABLED=1 SOCKET_NO_CONFIG=1 GIT_CEILING_DIRECTORIES=<w> socket-patch ... in <w>/proj."""
import hashlib, json, os, shutil, sys, base64
w = os.path.abspath(sys.argv[1])
def gh(b): return hashlib.sha256(b"blob %d\0" % len(b) + b).hexdigest()
shutil.rmtree(w, ignore_errors=True)
proj = os.path.join(w, "proj"); g = os.path.join(w, "gprefix", "lib", "node_modules")
os.makedirs(os.path.join(proj, ".git")); os.makedirs(os.path.join(w, "home"))
open(os.path.join(proj, ".git", "HEAD"), "w").write("ref: refs/heads/main\n")
catalog = {}
def pkg(root, n, v, last):
pk = os.path.join(root, n); os.makedirs(pk)
open(os.path.join(pk, "package.json"), "w").write(json.dumps({"name": n, "version": v}) + "\n")
before = f"module.exports = '{n}@{v} before'\n".encode(); after = f"module.exports = '{n}@{v} after'\n".encode()
open(os.path.join(pk, "index.js"), "wb").write(before)
catalog[f"pkg:npm/{n}@{v}"] = [{"uuid": "aaaaaaaa-0000-4000-8000-00000000000" + last, "purl": f"pkg:npm/{n}@{v}", "tier": "free", "severity": "high",
"ghsa": "GHSA-aaaa-aaaa-000" + last, "cve": "CVE-2026-000" + last, "publishedAt": "2026-01-01T00:00:00Z",
"files": {"package/index.js": {"before": base64.b64encode(before).decode(), "after": base64.b64encode(after).decode(), "beforeHash": gh(before), "afterHash": gh(after)}}}]
pkg(os.path.join(proj, "node_modules"), "ms", "2.0.0", "1")
pkg(g, "left-pad", "1.3.0", "2")
deps = {"ms": "2.0.0"}
open(os.path.join(proj, "package.json"), "w").write(json.dumps({"name": "app", "version": "1.0.0", "dependencies": deps}, indent=2) + "\n")
lock = {"name": "app", "version": "1.0.0", "lockfileVersion": 3, "requires": True, "packages": {"": {"name": "app", "version": "1.0.0", "dependencies": deps},
"node_modules/ms": {"version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-" + base64.b64encode(hashlib.sha512(b"ms2.0.0").digest()).decode()}}}
open(os.path.join(proj, "package-lock.json"), "w").write(json.dumps(lock, indent=2) + "\n")
json.dump(catalog, open(os.path.join(w, "catalog.json"), "w"), indent=1)For #2469, the same layout with #!/usr/bin/env python3
"""mknuget.py <dir>: a restored .NET project with one agent-mode patch record and two build outputs (no SDK).
Run with NUGET_PACKAGES=<dir>/pkgs and --offline."""
import hashlib, json, os, sys, shutil
def gh(b): return hashlib.sha256(b"blob %d\0" % len(b) + b).hexdigest()
d = os.path.abspath(sys.argv[1])
shutil.rmtree(d, ignore_errors=True)
pk = os.path.join(d, "pkgs"); pdir = os.path.join(pk, "newtonsoft.json", "13.0.3")
os.makedirs(os.path.join(pdir, "lib", "net6.0")); os.makedirs(os.path.join(d, "obj")); os.makedirs(os.path.join(d, ".socket", "blobs"))
open(os.path.join(d, "app.csproj"), "w").write('<Project Sdk="Microsoft.NET.Sdk" />')
json.dump({"version": 3, "targets": {}, "libraries": {"Newtonsoft.Json/13.0.3": {"type": "package", "path": "newtonsoft.json/13.0.3"}}, "packageFolders": {pk: {}}}, open(os.path.join(d, "obj", "project.assets.json"), "w"), indent=2)
open(os.path.join(pdir, "newtonsoft.json.nuspec"), "w").write("<package/>")
open(os.path.join(pdir, ".nupkg.metadata"), "w").write('{"contentHash":"deadbeef"}')
orig, patched = b"the vulnerable code\n", b"the patched code!!!\n"
open(os.path.join(pdir, "lib", "net6.0", "Newtonsoft.Json.dll"), "wb").write(orig)
for b in (orig, patched): open(os.path.join(d, ".socket", "blobs", gh(b)), "wb").write(b)
m = {"patches": {"pkg:nuget/Newtonsoft.Json@13.0.3": {"uuid": "20000008-0000-4008-8008-000000000008", "exportedAt": "2026-01-01T00:00:00Z",
"files": {"package/lib/net6.0/Newtonsoft.Json.dll": {"beforeHash": gh(orig), "afterHash": gh(patched)}},
"vulnerabilities": {"GHSA-aaaa-bbbb-cccc": {"cves": ["CVE-2026-0001"], "summary": "s", "severity": "high", "description": "d"}},
"description": "fix", "license": "MIT", "tier": "free"}}}
json.dump(m, open(os.path.join(d, ".socket", "manifest.json"), "w"), indent=2)
for cfg, b in (("Debug", patched), ("Release", orig)):
o = os.path.join(d, "bin", cfg, "net8.0"); os.makedirs(o); open(os.path.join(o, "Newtonsoft.Json.dll"), "wb").write(b)Needs a person
|
|
[agent] 2026-12-03: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 03:14Z: #2453, #2458 and #2461, each No lead was marked It is false for Maven and NuGet. One issue, #2472, with two parts and three failing tests. Four neighbouring cells ran clean. PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL153, confirmed, filed #2472 ( Files only (the binary of d987721, a stand-in patch API that knows no patch,
Afterwards With the real tools:
Two CLI tests, twins of L154, confirmed, in #2472: after
The note's "next package-manager install" does not come for a local repository (the Both parts are one issue because they are the two call sites of one helper ( Clean, files only:
No issue closed. No lead is marked Areas examined
Lessons
#!/usr/bin/env python3
"""mkcache.py <go|nuget|cargo> <w> [bumped]: a project whose one dependency lives in a machine-wide cache,
with an agent-mode patch record for it and the cache copy patched. With `bumped`, the project has moved to
the next version (the old, patched copy stays in the cache, as the real tool leaves it).
Run: env -i PATH HOME=<w>/home GOMODCACHE=<w>/gomodcache NUGET_PACKAGES=<w>/pkgs CARGO_HOME=<w>/cargo ... in <w>/proj."""
import hashlib, json, os, shutil, sys
def gh(b): return hashlib.sha256(b"blob %d\0" % len(b) + b).hexdigest()
eco, w = sys.argv[1], os.path.abspath(sys.argv[2]); bumped = len(sys.argv) > 3
shutil.rmtree(w, ignore_errors=True)
proj = os.path.join(w, "proj"); os.makedirs(os.path.join(proj, ".git")); os.makedirs(os.path.join(w, "home"))
open(os.path.join(proj, ".git", "HEAD"), "w").write("ref: refs/heads/main\n")
os.makedirs(os.path.join(proj, ".socket", "blobs"))
orig, patched = b"package errors // the vulnerable code\n", b"package errors // the patched code!!!\n"
def wr(p, b):
os.makedirs(os.path.dirname(p), exist_ok=True); open(p, "wb").write(b)
if eco == "go":
old, new = "v0.9.1", "v0.9.2"; mod = "github.com/pkg/errors"; purl = f"pkg:golang/{mod}@{old}"; key = "errors.go"
cache = os.path.join(w, "gomodcache")
for v, b in ((old, patched), (new, orig)):
wr(os.path.join(cache, f"{mod}@{v}", "errors.go"), b)
wr(os.path.join(cache, f"{mod}@{v}", "go.mod"), f"module {mod}\n".encode())
v = new if bumped else old
wr(os.path.join(proj, "go.mod"), f"module example.com/app\n\ngo 1.21\n\nrequire {mod} {v}\n".encode())
wr(os.path.join(proj, "go.sum"), f"{mod} {v} h1:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\n{mod} {v}/go.mod h1:BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=\n".encode())
wr(os.path.join(proj, "main.go"), b"package main\n")
copy = os.path.join(cache, f"{mod}@{old}", "errors.go")
elif eco == "nuget":
old, new = "13.0.3", "13.0.4"; purl = f"pkg:nuget/Newtonsoft.Json@{old}"; key = "package/lib/net6.0/Newtonsoft.Json.dll"
pk = os.path.join(w, "pkgs")
for v, b in ((old, patched), (new, orig)):
d = os.path.join(pk, "newtonsoft.json", v)
wr(os.path.join(d, "lib", "net6.0", "Newtonsoft.Json.dll"), b)
wr(os.path.join(d, "newtonsoft.json.nuspec"), b"<package/>")
wr(os.path.join(d, ".nupkg.metadata"), b'{"contentHash":"deadbeef"}')
v = new if bumped else old
wr(os.path.join(proj, "app.csproj"), b'<Project Sdk="Microsoft.NET.Sdk" />')
wr(os.path.join(proj, "obj", "project.assets.json"), json.dumps({"version": 3, "targets": {}, "libraries": {f"Newtonsoft.Json/{v}": {"type": "package", "path": f"newtonsoft.json/{v}"}}, "packageFolders": {pk: {}}}, indent=2).encode())
copy = os.path.join(pk, "newtonsoft.json", old, "lib", "net6.0", "Newtonsoft.Json.dll")
elif eco == "cargo":
old, new = "1.0.11", "1.0.12"; purl = f"pkg:cargo/itoa@{old}"; key = "src/lib.rs"
src = os.path.join(w, "cargo", "registry", "src", "index.crates.io-6f17d22bba15001f")
for v, b in ((old, patched), (new, orig)):
d = os.path.join(src, f"itoa-{v}")
wr(os.path.join(d, "src", "lib.rs"), b)
wr(os.path.join(d, "Cargo.toml"), f'[package]\nname = "itoa"\nversion = "{v}"\n'.encode())
wr(os.path.join(d, ".cargo-ok"), b'{"v":1}')
v = new if bumped else old
wr(os.path.join(proj, "Cargo.toml"), f'[package]\nname = "app"\nversion = "0.1.0"\nedition = "2021"\n\n[dependencies]\nitoa = "{v}"\n'.encode())
wr(os.path.join(proj, "Cargo.lock"), f'# This file is automatically @generated by Cargo.\nversion = 3\n\n[[package]]\nname = "app"\nversion = "0.1.0"\ndependencies = [\n "itoa",\n]\n\n[[package]]\nname = "itoa"\nversion = "{v}"\nsource = "registry+https://github.com/rust-lang/crates.io-index"\nchecksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"\n'.encode())
wr(os.path.join(proj, "src", "main.rs"), b"fn main() {}\n")
copy = os.path.join(src, f"itoa-{old}", "src", "lib.rs")
elif eco == "maven":
old, new = "1.0", "1.1"; purl = f"pkg:maven/com.example/victim@{old}"; key = f"package/victim-{old}.jar"
m2 = os.path.join(w, "m2")
for v, b in ((old, patched), (new, orig)):
d = os.path.join(m2, "com", "example", "victim", v)
wr(os.path.join(d, f"victim-{v}.jar"), b)
wr(os.path.join(d, f"victim-{v}.pom"), f"<project><modelVersion>4.0.0</modelVersion><groupId>com.example</groupId><artifactId>victim</artifactId><version>{v}</version></project>".encode())
v = new if bumped else old
wr(os.path.join(proj, "pom.xml"), f"<project><modelVersion>4.0.0</modelVersion><groupId>com.example</groupId><artifactId>app</artifactId><version>1.0</version><dependencies>\n <dependency><groupId>com.example</groupId><artifactId>victim</artifactId><version>{v}</version></dependency>\n</dependencies></project>\n".encode())
copy = os.path.join(m2, "com", "example", "victim", old, f"victim-{old}.jar")
for b in (orig, patched): open(os.path.join(proj, ".socket", "blobs", gh(b)), "wb").write(b)
m = {"patches": {purl: {"uuid": "20000008-0000-4008-8008-000000000008", "exportedAt": "2026-01-01T00:00:00Z",
"files": {key: {"beforeHash": gh(orig), "afterHash": gh(patched)}},
"vulnerabilities": {"GHSA-aaaa-bbbb-cccc": {"cves": ["CVE-2026-0001"], "summary": "s", "severity": "high", "description": "d"}},
"description": "fix", "license": "MIT", "tier": "free"}}}
json.dump(m, open(os.path.join(proj, ".socket", "manifest.json"), "w"), indent=2)
json.dump({}, open(os.path.join(w, "catalog.json"), "w"))
print(copy)Run it with Needs a person
|
|
[agent] 2026-12-03: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 05:23Z: #2453, #2458 and #2461, each No lead was marked Two of those rewriters do not apply the rule to a local path. Filed as #2474, with four real projects and two failing tests. A neighbouring question that the contract does not settle is #2475 ( PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL155, confirmed, filed #2474 ( The binary of d987721, the bench's stand-in patch service, and locks written by uv 0.11.32 and Composer 2.8.12. The local package in each project has the name and version of a package the service patches:
The same entry given to each rewriter (the patched package's entry of a bench fixture, changed to the shape its tool writes for a local file or directory):
Two probe tests fail on L156, filed #2475 ( Hand-made Composer locks, in #2474 as "not in this issue": an entry from another GitHub repository at another commit, an Clean:
No issue closed. No lead is marked Areas examined
Lessons
hxrun.py: run the binary in a bench fixture's environment
#!/usr/bin/env python3
"""hxrun.py <pm-dir> <args...>: run socket-patch with the env the bench printed for <pm-dir>/serve.out, in its project."""
import os, re, shlex, subprocess, sys
d = sys.argv[1]
txt = open(os.path.join(d, "serve.out")).read()
line = re.search(r"^env -i .*$", txt, re.M).group(0)
toks = shlex.split(line)[2:]
env = {}; i = 0
while "=" in toks[i] and not toks[i].startswith("/"):
k, v = toks[i].split("=", 1); env[k] = v; i += 1
P = os.environ.get("HX_CWD") or toks[toks.index("--cwd") + 1]
if sys.argv[2] == "--print":
print(P); print(" ".join(toks[i:])); sys.exit(0)
r = subprocess.run([toks[i]] + sys.argv[2:] + ["--cwd", P], env=env, cwd=P, stdin=subprocess.DEVNULL)
sys.exit(r.returncode)The entry shapes, for the package the baseline scan rewrites:
Needs a person
|
|
[agent] 2026-12-03: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 07:15Z: #2453, #2458 and #2461, each No lead was marked One cell fails: vendored mode replaces a Composer PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL157, confirmed, on #2474 (a comment):
A symlinked The vendored writer finds the lock entry by name and version and asks only whether it is already wired to this patch's copy ( Both writers read the entry through one model ( Clean: every other writer, with locks the real tools wrote. A local
Controls: a uv project locked from PyPI is vendored by the same stand-in, and a vendored Composer project without a Seen and not filed, each a true refusal with an imprecise sentence:
The prune's keeps, read and not mutated. The last three entries left "the keeps under mutation" unrun. Each keep has a test that reads the manifest after the wet run: No issue closed or filed. No lead is marked Areas examined
Lessons
The fixtures
#!/usr/bin/env python3
"""A papi.py catalog entry and dist zip for a vendored Composer run (appended to cat.json)."""
import base64, hashlib, io, json, uuid, zipfile
def gh(b): return hashlib.sha256(b"blob %d\0" % len(b) + b).hexdigest()
purl = "pkg:composer/acme/zoka@1.2.3"
before = b'<?php namespace Acme\\Zoka; class Client { const WHO = "PUBLIC RELEASE"; }\n'
after = b'<?php namespace Acme\\Zoka; class Client { const WHO = "PUBLIC RELEASE, SOCKET PATCHED"; }\n'
buf = io.BytesIO()
with zipfile.ZipFile(buf, "w", zipfile.ZIP_DEFLATED) as z:
z.writestr("acme-zoka-0123abc/composer.json", b'{"name": "acme/zoka", "version": "1.2.3"}\n')
z.writestr("acme-zoka-0123abc/src/Client.php", after)
body = buf.getvalue(); open("art/zoka-1.2.3.zip", "wb").write(body)
u = str(uuid.uuid5(uuid.NAMESPACE_URL, "patch:" + purl)); tok = str(uuid.uuid5(uuid.NAMESPACE_URL, "grant:" + purl))
entry = {"purl": purl, "uuid": u, "file": "package/src/Client.php",
"files": {"package/src/Client.php": {"beforeHash": gh(before), "afterHash": gh(after)}},
"artifact": {"path": f"/patch/composer/acme/zoka/1.2.3/{tok}/{u}/zoka-1.2.3.zip", "local": "art/zoka-1.2.3.zip",
"integrity": {"sha512": "sha512-" + base64.b64encode(hashlib.sha512(body).digest()).decode(),
"sha1": hashlib.sha1(body).hexdigest()}}}
cat = json.load(open("cat.json")); cat["patches"].append(entry); json.dump(cat, open("cat.json", "w"), indent=1)The Composer project: The JS projects: The Python projects: the wheel is a zip of The Go project: Needs a person
|
|
[agent] 2026-12-03: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 09:17Z: #2453, #2458 and #2461, each No lead was marked One defect on PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL158, confirmed, filed #2477 ( With real git 2.43.0 and npm 10.9.9, the binary of d987721 and a stand-in patch API:
The same cell for each lock, files only (an npm monorepo with six applied records, plus one package the lock lists that is not installed):
A test beside The planned fix is one rule in the prune (a lock that is there and was not read exempts the entries of the ecosystem it locks, in both scopes, wet and in the preview), and a diagnosis from the five readers that return "no lock" for a file they cannot parse. The contract's fail-safe for an ecosystem the run never looked for ("absence is not evidence of removal") settles the behaviour; the issue asks one thing, whether the kept entries ride the lock's warning or get a code. How bad: a later The prune's keeps under mutation: guarded, but for the global keep's preview. Six mutants behind one switch, each skipping one keep at its call site (
Seen and not filed: the preview discards the keeps' warnings ( No issue closed. No lead is marked Areas examined
Lessons
The fixtures
The conflict, for any lock: wrap one line in #!/usr/bin/env python3
"""mklock.py <kind>: replace the root package-lock.json of the cwd project with a yarn / pnpm / bun lock of the same four packages."""
import json, os, sys, base64, hashlib
kind = sys.argv[1]
deps = json.load(open("package.json"))["dependencies"]
def integ(n, v): return "sha512-" + base64.b64encode(hashlib.sha512((n+v).encode()).digest()).decode()
def tgz(n, v): return f"https://registry.npmjs.org/{n}/-/{n.split('/')[-1]}-{v}.tgz"
os.remove("package-lock.json")
if kind == "yarn":
out = "# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n# yarn lockfile v1\n\n\n"
for n, v in sorted(deps.items()):
key = f'"{n}@{v}"' if n.startswith("@") else f"{n}@{v}"
out += f'{key}:\n version "{v}"\n resolved "{tgz(n, v)}#{hashlib.sha1((n+v).encode()).hexdigest()}"\n integrity {integ(n, v)}\n\n'
open("yarn.lock", "w").write(out)
elif kind == "pnpm":
out = "lockfileVersion: '9.0'\n\nsettings:\n autoInstallPeers: true\n excludeLinksFromLockfile: false\n\nimporters:\n\n .:\n dependencies:\n"
for n, v in sorted(deps.items()):
k = f"'{n}'" if n.startswith("@") else n
out += f" {k}:\n specifier: {v}\n version: {v}\n"
out += "\npackages:\n\n"
for n, v in sorted(deps.items()):
k = f"'{n}@{v}'" if n.startswith("@") else f"{n}@{v}"
out += f" {k}:\n resolution: {{integrity: {integ(n, v)}}}\n\n"
out += "snapshots:\n\n"
for n, v in sorted(deps.items()):
k = f"'{n}@{v}'" if n.startswith("@") else f"{n}@{v}"
out += f" {k}: {{}}\n\n"
open("pnpm-lock.yaml", "w").write(out)
elif kind.startswith("bun"):
ver = int(kind[3:] or 1)
out = '{\n "lockfileVersion": %d,\n "workspaces": {\n "": {\n "name": "p-root",\n "dependencies": {\n' % ver
for n, v in sorted(deps.items()):
out += f' "{n}": "{v}",\n'
out += ' },\n },\n },\n "packages": {\n'
for n, v in sorted(deps.items()):
out += f' "{n}": ["{n}@{v}", "", {{}}, "{integ(n, v)}"],\n\n'
out = out.rstrip("\n") + "\n }\n}\n"
open("bun.lock", "w").write(out)#!/usr/bin/env python3
"""addeco.py <composer|cargo|uv|poetry|go>: give the cwd project that ecosystem's manifest and lock for one package
that is NOT installed, and a manifest record for it."""
import json, hashlib, sys
def gh(b): return hashlib.sha256(b"blob %d\0" % len(b) + b).hexdigest()
eco = sys.argv[1]
if eco == "composer":
purl, f = "pkg:composer/monolog/monolog@2.9.1", "src/Monolog/Logger.php"
open("composer.json","w").write('{\n "name": "acme/app",\n "require": {\n "monolog/monolog": "2.9.1"\n }\n}\n')
lock = {"_readme": ["This file locks the dependencies of your project to a known state"], "content-hash": "0123456789abcdef0123456789abcdef",
"packages": [{"name": "monolog/monolog", "version": "2.9.1",
"source": {"type": "git", "url": "https://github.com/Seldaek/monolog.git", "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1"},
"dist": {"type": "zip", "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1", "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1", "shasum": ""},
"type": "library"}],
"packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], "prefer-stable": False, "prefer-lowest": False, "platform": [], "platform-dev": [], "plugin-api-version": "2.6.0"}
open("composer.lock","w").write(json.dumps(lock, indent=4) + "\n")
elif eco == "cargo":
purl, f = "pkg:cargo/itoa@1.0.11", "src/lib.rs"
open("Cargo.toml","w").write('[package]\nname = "app"\nversion = "0.1.0"\nedition = "2021"\n\n[dependencies]\nitoa = "=1.0.11"\n')
open("Cargo.lock","w").write('# This file is automatically @generated by Cargo.\n# It is not intended for manual editing.\nversion = 3\n\n[[package]]\nname = "app"\nversion = "0.1.0"\ndependencies = [\n "itoa",\n]\n\n[[package]]\nname = "itoa"\nversion = "1.0.11"\nsource = "registry+https://github.com/rust-lang/crates.io-index"\nchecksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"\n')
import os; os.makedirs("src", exist_ok=True); open("src/main.rs","w").write("fn main() {}\n")
elif eco == "uv":
purl, f = "pkg:pypi/six@1.16.0", "six.py"
open("pyproject.toml","w").write('[project]\nname = "app"\nversion = "0.1.0"\nrequires-python = ">=3.9"\ndependencies = ["six==1.16.0"]\n')
open("uv.lock","w").write('version = 1\nrevision = 1\nrequires-python = ">=3.9"\n\n[[package]]\nname = "app"\nversion = "0.1.0"\nsource = { virtual = "." }\ndependencies = [\n { name = "six" },\n]\n\n[package.metadata]\nrequires-dist = [{ name = "six", specifier = "==1.16.0" }]\n\n[[package]]\nname = "six"\nversion = "1.16.0"\nsource = { registry = "https://pypi.org/simple" }\nsdist = { url = "https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", size = 34041 }\nwheels = [\n { url = "https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254", size = 11053 },\n]\n')
elif eco == "poetry":
purl, f = "pkg:pypi/six@1.16.0", "six.py"
open("pyproject.toml","w").write('[tool.poetry]\nname = "app"\nversion = "0.1.0"\ndescription = ""\nauthors = []\n\n[tool.poetry.dependencies]\npython = "^3.9"\nsix = "1.16.0"\n\n[build-system]\nrequires = ["poetry-core"]\nbuild-backend = "poetry.core.masonry.api"\n')
open("poetry.lock","w").write('# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.\n\n[[package]]\nname = "six"\nversion = "1.16.0"\ndescription = "Python 2 and 3 compatibility utilities"\noptional = false\npython-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"\nfiles = [\n {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"},\n {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"},\n]\n\n[metadata]\nlock-version = "2.0"\npython-versions = "^3.9"\ncontent-hash = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"\n')
elif eco == "go":
purl, f = "pkg:golang/github.com/pkg/errors@v0.9.1", "errors.go"
open("go.mod","w").write("module example.com/app\n\ngo 1.21\n\nrequire github.com/pkg/errors v0.9.1\n")
open("go.sum","w").write("github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\ngithub.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\n")
open("main.go","w").write("package main\n\nimport _ \"github.com/pkg/errors\"\n\nfunc main() {}\n")
b, a = b"before " + eco.encode() + b"\n", b"after " + eco.encode() + b"\n"
for x in (b, a): open(".socket/blobs/" + gh(x), "wb").write(x)
m = json.load(open(".socket/manifest.json"))
m["patches"][purl] = {"uuid": "99999999-0000-4000-8000-0000000000%02d" % (len(m["patches"])), "exportedAt": "2026-01-01T00:00:00Z", "files": {f: {"beforeHash": gh(b), "afterHash": gh(a)}},
"vulnerabilities": {"GHSA-cccc-cccc-0001": {"cves": [], "summary": "s", "severity": "high", "description": "d"}}, "description": "d", "license": "MIT", "tier": "free"}
json.dump(m, open(".socket/manifest.json", "w"), indent=2)#!/usr/bin/env python3
"""mkcatalog.py <project> <catalog.json> name@version:file ...: a catalog for api.py from the installed files."""
import base64, hashlib, json, os, sys
def gh(b): return hashlib.sha256(b"blob %d\0" % len(b) + b).hexdigest()
proj, out = sys.argv[1], sys.argv[2]; cat = {}
for i, spec in enumerate(sys.argv[3:]):
nv, f = spec.split(":"); n, v = nv.rsplit("@", 1)
before = open(os.path.join(proj, "node_modules", n, f), "rb").read()
after = before + b"\n// patched by the stand-in patch service\n"
purl = f"pkg:npm/{n}@{v}"
cat[purl] = [{"uuid": f"bbbbbbbb-0000-4000-8000-00000000000{i+1}", "purl": purl, "tier": "free", "severity": "high",
"ghsa": f"GHSA-bbbb-bbbb-000{i+1}", "cve": f"CVE-2026-100{i+1}", "publishedAt": "2026-01-01T00:00:00Z",
"files": {"package/" + f: {"before": base64.b64encode(before).decode(), "after": base64.b64encode(after).decode(),
"beforeHash": gh(before), "afterHash": gh(after)}}}]
json.dump(cat, open(out, "w"), indent=1)The real merge ( git init -q -b main . && printf 'node_modules\n' > .gitignore
# package.json: "dependencies": {"is-number": "7.0.0", "ms": "^2.1.0"}
npm install && npm install ms@2.1.1 && sed -i 's/"ms": "^2.1.1"/"ms": "^2.1.0"/' package.json && npm install
sp scan --mode agent --yes && git add -A && git commit -q -m base
git checkout -q -b add-left-pad && npm install left-pad@1.3.0 && npm update ms
sp scan --mode agent --yes && git add -A && git commit -q -m "Add left-pad with its patch; update ms"
git checkout -q main && git checkout -q -b feature
npm install ms@2.1.2 && git checkout -q package.json && npm install && git add -A && git commit -q -m "Update ms"
git merge add-left-pad # CONFLICT (content): Merge conflict in package-lock.json
sp scan --sync --yes # prunes pkg:npm/left-pad@1.3.0The mutants: one helper in Needs a person
|
|
[agent] 2026-12-03: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 11:16Z: #2453, #2458 and #2461, each No lead was marked One finding, filed as #2480 ( PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL159, filed #2480 ( The binary of d987721 and a stand-in patch API; machine A has
The same record on the same machine is kept when Maven is the project's only ecosystem and dropped when the project also has an installed npm half. The second ecosystem's files, with the npm half installed in each row and a record for a package they declare that is not installed:
A probe test beside Why a question: the contract says the prune "removes manifest entries for packages no longer present in the crawl" and is off by default "so a temporary uninstall doesn't silently destroy manifest state"; docs/usage.md says it is to "remove records for dependencies that left the project". The issue gives three options: leave it and say so in the docs; skip an ecosystem the crawl found nothing of, as the empty crawl is skipped (one rule, beside the one planned in #2477); or keep what the project's files still declare (exact for direct dependencies, one reader per ecosystem). The rows are files only; no build tool ran. L160, true, out of charter (rare): with no lock, an installed npm package whose
It needs a project with the lock off and a half-written install, which the package manager's next install replaces. Not filed. Clean: a hosted or vendored Clean: a mode switch from agent to hosted over a manifest that holds records of both scopes. The bench's hosted npm fixture, with three hand-made agent-mode records applied in place: the package the hosted scan switches, another project package, and
A hosted scan writes nothing under Seen and not filed: a project No issue closed. No lead is marked Areas examined
Lessons
The fixtures
#!/usr/bin/env python3
"""addrec.py <project> <purl> <file>: add a manifest record (and its two blobs) for a package of another ecosystem."""
import json, hashlib, sys, os
proj, purl, f = sys.argv[1:4]
def gh(b): return hashlib.sha256(b"blob %d\0" % len(b) + b).hexdigest()
b, a = b"before " + purl.encode() + b"\n", b"after " + purl.encode() + b"\n"
for x in (b, a): open(os.path.join(proj, ".socket/blobs", gh(x)), "wb").write(x)
mp = os.path.join(proj, ".socket/manifest.json")
m = json.load(open(mp))
m["patches"][purl] = {"uuid": "99999999-0000-4000-8000-0000000000%02d" % (len(m["patches"])), "exportedAt": "2026-01-01T00:00:00Z",
"files": {f: {"beforeHash": gh(b), "afterHash": gh(a)}},
"vulnerabilities": {"GHSA-cccc-cccc-0001": {"cves": [], "summary": "s", "severity": "high", "description": "d"}},
"description": "d", "license": "MIT", "tier": "free"}
json.dump(m, open(mp, "w"), indent=2)One cell: copy the applied repository, The two machines: one project, The switch: Needs a person
|
|
[agent] 2026-12-03: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 15:24Z: #2453, #2458 and #2461, each No lead was marked One finding, on #2477 as a comment: four more lock readers take a lock they cannot parse for no lock, so the prune drops the record there too. Run with real PDM and a real PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL161, confirmed, on #2477 (a comment): Real PDM 2.29.8 and git 2.43.0, the binary of d987721, a stand-in patch API that offers nothing. A colleague's branch adds
The other locks, each beside an npm project with two applied records and one record for a package the lock lists and nothing installs:
L162, true, out of charter (the contract allows):
The contract says the model "is not uniform today": npm-family copies below Clean: PDM and Pipenv with a local wheel, in both modes (the line three entries left as "not run"; #2474 stays as it is, uv's
PDM 2.29.8 writes lock version 4.6.0, which hosted mode refuses before any of this ("Unsupported PDM lock_version", #2398, another agent's). Seen and not filed:
Read and already handled, while choosing:
No issue closed or filed. No lead is marked Areas examined
Lessons
The fixtures
The base project, by hand: The locks by hand: A conflict: one line of the lock wrapped in The wheels: the project's own is a zip of The nested project: Needs a person
|
|
[agent] 2026-12-03: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 17:19Z: #2453, #2458 and #2461, each No lead was marked Two findings, both in the remedies, filed as #2486 and #2487. The other three areas are clean. PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL163, confirmed, filed #2486:
L166, confirmed, filed #2487: most printed remedies drop the
The plan on the issue is one helper for every printed command and a source test that fails on a literal one. It leaves one question open: what a hosted or vendored run over several PATH directories should print. L164, true, out of charter: two flag twins are not in the child-environment scrub list. L165, true, out of charter: Seen and not filed:
Read and already handled, while choosing:
No issue closed. No lead is marked Areas examined
Lessons
The fixtures
The pseudo-terminal: Python's A shim, linked under each tool's name in a directory first on #!/bin/sh
name=$(basename "$0")
{ printf 'TOOL %s ARGS %s\n' "$name" "$*"; env | grep -E '^SOCKET_|sktsec_' | sed 's/^/ ENV /'; } >> "$SHIM_LOG"
real=$(PATH="$REAL_PATH" command -v "$name" 2>/dev/null)
[ -n "$real" ] && PATH="$REAL_PATH" exec "$real" "$@"
exit 127The run's environment: The npm generator: versions Needs a person
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Note
[agent] This is the third architecture thread for socket-patch. It replaces #1830 (file-by-file sweeps, now closed), which replaced #560 (module-level review). Both are archived on the ledger branch under
review/.Progress: 1 problems tracked · 1 filed. On GitHub: 164 open and 166 closed
arch-auditissues · 3 open and 122 mergedarch-refactorPRs.arch-refactor· issues labelledarch-audit· decisions neededRendered 2026-12-03 17:27 UTC (ledger
f1e31360) fromdoc/on thearch-audit/ledgerbranch.socket-patch architecture refactor: real problems only
Started 2026-11-25.
Charter
A scheduled routine improves socket-patch's structure, one real problem per PR. Each PR shows the problem on
mainwith a failing test or a command's output, and shows it gone after the fix. A problem counts when it is one of these:--json/--silenthandled two ways, leaked credentials, wrong exit codes,--cwdignored.These aren't enough on their own: inlining, wrappers, comments, naming, moving code, helper copies that still agree, and line counts. They are welcome only inside code a real fix already touches.
A run that finds nothing worth fixing records what it examined and opens no PR. At most 3 of the routine's PRs are open at a time, because a person reviews every one.
The full procedure is
REFACTOR.mdon the ledger branch.All reactions