Repository navigation
socket-patch architecture refactor: real problems only (living document) #2244
Replies: 107 comments
|
[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-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
|
|
[agent] 2026-12-03: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 19:13Z: #2453, #2458 and #2461, each No lead was marked One finding, filed as #2489: a vendored scan breaks the usual Dockerfile dependency layer for npm, pnpm, Bun, pip, uv and Go, and the run says so for gems only. One correction to this routine's own #2487, and one more row on #2486. PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL168, confirmed, filed #2489 ( The binary of d987721, a stand-in patch service, a lock written by each real tool, and the Dockerfile in the project root. Every scan exits 0 and prints the two usual next steps. The layer is the files its
With the named files copied, each install passes and the installed file is the patched one. A probe test beside L169, a correction, on #2487 (a comment): the L163, one more row, on #2486 (a comment): PyPI is as npm. L167, rejected: the hand-made git walk in L170, true, out of charter (narrow): the search for projects below Seen and not filed:
No issue closed. No lead is marked Areas examined
Lessons
The fixtures
The Go project: The agent-mode project of L169 and L170 is Needs a person
|
|
[agent] 2026-12-03: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 21:23Z: #2453, #2458 and #2461, each No lead was marked One finding, filed as #2490: after a hosted or vendored NuGet scan, the usual .NET Dockerfile builds the image with the unpatched package, and nothing says so. One more row on #2489 (hosted pnpm), and one on #2490 (sbt, by reading). PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL171, confirmed, filed #2490 ( The real SDK 8.0.428 in
Without The code states the rule for the scan's own machine (the warning of #352, core L172, confirmed, on #2489 (a comment): a hosted pnpm scan on the registry route creates
Nothing is installed in a failing cell, so this is #2489's class (the build breaks), beside its L173, on #2490 (a comment; read, and the suite's own test): sbt's wiring is a root file no user file refers to. Hosted mode writes Read and rejected while choosing: Seen and not filed:
No issue closed. No lead is marked Areas examined
Lessons
The fixturesThe .NET fixture, the base image, both Dockerfiles and the probe test are in #2490. The routed pnpm grant is the catalog entry of {"reference": {"status": "granted", "purl": "pkg:npm/left-pad@1.3.0", "url": "@BASE@<dir>/left-pad-1.3.0.tgz",
"artifacts": [{"kind": "tarball", "url": "@BASE@<dir>/left-pad-1.3.0.tgz", "integrity": {"sha512": "sha512-<base64>"}}],
"registryOverride": null, "npmRegistryUrl": "@BASE@<dir>/"},
"files": {"<dir>/left-pad": "<a file: {name, dist-tags, versions: {1.3.0: {name, version, dist: {tarball, integrity}}}}>"}}The project is Needs a person
|
|
[agent] 2026-12-03: 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 One finding, filed as #2494: for a hosted or vendored Maven package, a NuGet package and a PyPI package with a dot in its name, it is not, and the OpenVEX matching library finds no statement for the spelling in the files. No scanner ran (see below), so the last step of the claim is not run. PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL174, confirmed on socket-patch's side, filed #2494 ( The binary of d987721, the bench's stand-in patch service, and the fixture of
"Asked" is L175, on #2494 (a comment): the document writes a NuGet id in lower case. The bench's hosted NuGet project: L176, on #2494 (a comment): a PyPI name with a dot. The patch key is the PEP 503 name ( The other ecosystems, with the same matcher over a document written by hand: Go and Composer names match in any case; npm, Maven, Cargo and gem names match only as written, and by reading the document writes those as the project's files do. A hosted Go module is replaced by a module of another path, which has no advisory. L177, rejected: an installed npm package whose Read and left while choosing:
No issue closed. No lead is marked Areas examined
Lessons
The fixtures
The npm states: The PyPI venv ( The matcher's name rules: a document written by hand with the products Needs a person
|
|
[agent] 2026-12-04: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 01:35Z: #2453, #2458 and #2461, each No lead was marked
PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL178, confirmed, filed #2496 (
Two predicates answer "is this a Plug'n'Play project?". The read-only probe refuses when a loader file exists (core The rewritten project works: The issue gives the two ways out: refuse always (the hosted writer takes #539's predicate), or support hosted mode on Plug'n'Play. It says the second is where the runs point, and that one package on one Yarn release is thin, so the first is the safe choice until more cells run. L179, confirmed, filed #2498 (
The contract states the 5.1.0 outcome as a hazard of "a release that predates Rejected: an output mode changes what a command does. 13,104 runs: the 42 rows of the command list (36 distinct commands), each plain, with Rejected: the berry checksum port disagrees with Yarn. 74 direct dependencies picked for old and odd tarballs, 835 locked packages, installed by Yarn 4.12.0, each registry tarball run through Rejected: Yarn's pnpm linker ( Read and left: No issue closed. No lead is marked Areas examined
Lessons
The fixtures
import json, tarfile, hashlib, urllib.request
c = json.load(open("cat.json")); p = c["patches"][0]; a = p["artifact"]
# 1. the grant names the checksum Yarn computes for the patched tarball: a scratch project with
# "left-pad": "<BASE><a['path']>" and nodeLinker: node-modules, `yarn install`, then yarn.lock's checksum
p["reference"] = {"status": "granted", "url": "@BASE@" + a["path"], "purl": p["purl"], "registryOverride": None,
"artifacts": [{"kind": "tarball", "url": "@BASE@" + a["path"], "integrity": a["integrity"]},
{"kind": "yarn-berry-zip", "integrity": {"yarnBerry10c0": "10c0/<hex from that lock>"}}]}
# 2. the undo asks for the upstream release's checksum (the project's lock before the scan has it)
doc = json.load(urllib.request.urlopen("https://registry.npmjs.org/left-pad/1.3.0"))
json.dump({"name": "left-pad", "version": "1.3.0", "integrity": doc["dist"]["integrity"],
"yarnBerry10c0": "10c0/<hex from the original lock>"}, open("art/upstream.json", "w"))
c["files"] = {f"/upstream/npm/{p['uuid']}.json": "art/upstream.json"}
# 3. agent mode downloads blobs by hash
after = tarfile.open(a["local"]).extractfile("package/index.js").read()
before = after[:-len(b"\n// SOCKET_PATCHED\n")]
for name, b in (("after", after), ("before", before)):
h = hashlib.sha256(b"blob %d\0" % len(b) + b).hexdigest(); open(f"art/{name}.blob", "wb").write(b)
c["files"][f"/v0/orgs/bench-org/patches/blob/{h}"] = f"art/{name}.blob"
json.dump(c, open("cat.json", "w"), indent=1)The projects:
for st in states:
for cmd in COMMANDS:
res = {}
for form, extra in (("plain", []), ("json", ["--json"]), ("silent", ["--silent"]), ("json+silent", ["--json", "--silent"])):
restore(st); res[form] = run(base(cmd) + extra) # (exit, stdout, stderr)
# flagged: exit codes differ by form; --json stdout is not one JSON document, or its status
# disagrees with the exit code; --silent prints on exit 0, prints nothing on a failure, or
# prints to stdout on a failure; json+silent has stderr on exit 0; an ANSI escape anywhereThe checksum probe, in the tests of core #[test] #[ignore]
fn zz_probe_dir() {
let dir = std::env::var("ZZ_TGZ_DIR").unwrap();
for line in std::fs::read_to_string(format!("{dir}/list.tsv")).unwrap().lines() {
let (ident, file) = line.split_once('\t').unwrap();
let bytes = std::fs::read(format!("{dir}/{file}")).unwrap();
println!("ZZ\t{ident}\t{file}\t{:?}", berry_cache_checksum_10c0(&bytes, ident));
}
}Needs a person
|
|
[agent] 2026-12-04: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 03:40Z: #2453, #2458 and #2461, each No lead was marked A preload shim fails the k-th file operation of a command, for every k: once with PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL180, confirmed, on #2383 (a comment): a file socket-patch did not write, left in the Maven tree, survives a successful undo, and
It was first seen as an empty directory: a L181, rejected: a failed write, sync, rename, link, unlink or mkdir makes a command lie. Every operation of each command failed in turn, once (
On a full disk, a hosted run that has replaced one of two files cannot write the old one back. It says so and names the file: "Cargo.lock is left with its new content (No space left on device); every other file is unchanged" (Bundler, Cargo, Go, NuGet, pnpm, uv, Yarn berry: three operations each). A hosted Maven L182, rejected: a failed read is taken for "not there" and the outcome is wrong. Each open of an existing file, each L183, true, out of charter (narrow): four small things the matrices showed.
Seen and not filed:
No issue closed. No lead is marked Areas examined
Lessons
The fixtures
// LD_PRELOAD shim: makes a file operation of the process FAIL (return -1, errno set) instead of
// stopping the process. It counts the file operations under FAULT_SCOPE (a path prefix):
// openw an open that can write (O_WRONLY/O_RDWR/O_CREAT/O_TRUNC)
// write write/pwrite/writev/copy_file_range/sendfile/ftruncate/fallocate on such a file (space)
// sync fsync/fdatasync on such a file, or on a directory under the scope (space)
// rename, unlink (unlink, rmdir), mkdir (space), link (link, symlink), chmod
// with FAULT_READS=1 also: openr (an open that only reads an EXISTING file), opendir, read
// FAULT_AT=k the k-th counted operation fails with FAULT_ERRNO (default 5, EIO)
// FAULT_MODE=sticky a full disk: from the k-th SPACE operation on, every space operation fails
// with ENOSPC; everything else succeeds (k counts those only)
// FAULT_MODE=always every counted operation fails (with FAULT_MATCH: one file unreadable all run)
// FAULT_KINDS comma list of the kinds that count (default: all)
// FAULT_MATCH count only operations whose "<kind> <path>" contains this; "...$" = ends with
// FAULT_LOG one line per counted operation: "<n> <kind> <path> [FAIL]"
// No FAULT_AT: nothing fails, the log is the list of operations.
#define _GNU_SOURCE
#include <dlfcn.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <pthread.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>
#define MAXFD 65536
static int inited = 0, logfd = -1, sticky = 0, always = 0, failing = 0, fault_errno = EIO;
static long fault_at = -1, counter = 0;
static char scope[PATH_MAX], kinds[256], match[512];
static char fdpath[MAXFD][160];
static unsigned char tracked[MAXFD];
static unsigned char rtracked[MAXFD];
static int reads = -1;
static pthread_mutex_t mu = PTHREAD_MUTEX_INITIALIZER;
static int reads_on(void) { if (reads < 0) reads = getenv("FAULT_READS") != NULL; return reads; } // FAULT_READS=1: count read-side operations too
#define REAL(name) ({ static __typeof__(&name) p; if (!p) p = (__typeof__(&name))dlsym(RTLD_NEXT, #name); p; })
static void init(void) {
if (inited) return;
inited = 1;
const char *s = getenv("FAULT_SCOPE");
if (s) strncpy(scope, s, sizeof scope - 1);
const char *a = getenv("FAULT_AT");
if (a) fault_at = atol(a);
const char *e = getenv("FAULT_ERRNO");
if (e) fault_errno = atoi(e);
const char *m = getenv("FAULT_MODE");
if (m && !strcmp(m, "sticky")) { sticky = 1; fault_errno = ENOSPC; }
if (m && !strcmp(m, "always")) always = 1; // every counted (matching) operation fails
const char *k = getenv("FAULT_KINDS");
if (k) snprintf(kinds, sizeof kinds, ",%s,", k);
const char *mt = getenv("FAULT_MATCH"); // count only the operations whose kind+path contain this
if (mt) strncpy(match, mt, sizeof match - 1);
const char *l = getenv("FAULT_LOG");
if (l) logfd = REAL(open)(l, O_WRONLY | O_CREAT | O_APPEND | O_CLOEXEC, 0644);
}
static int in_scope(int dirfd, const char *path, char *out, size_t n) {
init();
if (!scope[0] || !path) return 0;
char buf[PATH_MAX];
if (path[0] == '/') snprintf(buf, sizeof buf, "%s", path);
else if (dirfd == AT_FDCWD) {
char cwd[PATH_MAX];
if (!getcwd(cwd, sizeof cwd)) return 0;
snprintf(buf, sizeof buf, "%s/%s", cwd, path);
} else {
char link[64], dir[PATH_MAX];
snprintf(link, sizeof link, "/proc/self/fd/%d", dirfd);
ssize_t r = readlink(link, dir, sizeof dir - 1);
if (r <= 0) return 0;
dir[r] = 0;
snprintf(buf, sizeof buf, "%s/%s", dir, path);
}
if (strncmp(buf, scope, strlen(scope))) return 0;
if (out) snprintf(out, n, "%s", buf + strlen(scope));
return 1;
}
// Returns 1 when this operation must fail (errno is set).
static int hit(const char *kind, int space, const char *what) {
init();
if (kinds[0]) { char pat[32]; snprintf(pat, sizeof pat, ",%s,", kind); if (!strstr(kinds, pat)) return 0; }
if (match[0]) { char kw[PATH_MAX + 32]; snprintf(kw, sizeof kw, "%s %s", kind, what); size_t ml = strlen(match), kl = strlen(kw);
if (ml && match[ml - 1] == '$') { if (kl < ml - 1 || strncmp(kw + kl - (ml - 1), match, ml - 1)) return 0; } // "...$": the operation ends with this
else if (!strstr(kw, match)) return 0; }
pthread_mutex_lock(&mu);
int fail = 0;
if (sticky) {
if (space) { counter++; if (fault_at > 0 && counter >= fault_at) fail = 1; }
} else {
counter++;
if (always || (fault_at > 0 && counter == fault_at)) fail = 1;
}
long n = counter;
pthread_mutex_unlock(&mu);
if (logfd >= 0 && (!sticky || space)) {
char line[512];
int len = snprintf(line, sizeof line, "%ld %s %s%s\n", n, kind, what, fail ? " FAIL" : "");
REAL(write)(logfd, line, len);
}
if (fail) { failing = 1; errno = fault_errno; }
return fail;
}
static int writable(int flags) { return (flags & O_ACCMODE) != O_RDONLY || (flags & (O_CREAT | O_TRUNC)); }
static void track(int fd, const char *rel) {
if (fd >= 0 && fd < MAXFD) { tracked[fd] = 1; snprintf(fdpath[fd], sizeof fdpath[fd], "%s", rel); }
}
static const char *fdname(int fd) { return fd >= 0 && fd < MAXFD ? fdpath[fd] : "?"; }
static int is_tracked(int fd) { init(); return fd >= 0 && fd < MAXFD && tracked[fd]; }
#define OPEN_BODY(real_call, dirfd) \
char rel[PATH_MAX]; mode_t mode = 0; \
if (flags & (O_CREAT | O_TMPFILE)) { va_list ap; va_start(ap, flags); mode = va_arg(ap, mode_t); va_end(ap); } \
int inside = in_scope(dirfd, path, rel, sizeof rel); \
int scoped = writable(flags) && inside; \
if (scoped && hit("openw", 0, rel)) return -1; \
if (inside && !scoped && reads_on() && faccessat(dirfd, path, F_OK, 0) == 0 && hit((flags & O_DIRECTORY) ? "opendir" : "openr", 0, rel)) return -1; \
int fd = real_call; \
if (scoped) track(fd, rel); \
else if (inside && reads_on() && fd >= 0 && fd < MAXFD) { rtracked[fd] = 1; snprintf(fdpath[fd], sizeof fdpath[fd], "%s", rel); } \
return fd;
int open(const char *path, int flags, ...) { OPEN_BODY(REAL(open)(path, flags, mode), AT_FDCWD) }
int open64(const char *path, int flags, ...) { OPEN_BODY(REAL(open64)(path, flags, mode), AT_FDCWD) }
int openat(int dirfd, const char *path, int flags, ...) { OPEN_BODY(REAL(openat)(dirfd, path, flags, mode), dirfd) }
int openat64(int dirfd, const char *path, int flags, ...) { OPEN_BODY(REAL(openat64)(dirfd, path, flags, mode), dirfd) }
int creat(const char *path, mode_t mode) {
char rel[PATH_MAX]; int scoped = in_scope(AT_FDCWD, path, rel, sizeof rel);
if (scoped && hit("openw", 0, rel)) return -1;
int fd = REAL(creat)(path, mode); if (scoped) track(fd, rel); return fd;
}
int close(int fd) { if (fd >= 0 && fd < MAXFD) { tracked[fd] = 0; rtracked[fd] = 0; } return REAL(close)(fd); }
ssize_t read(int fd, void *b, size_t n) { if (fd >= 0 && fd < MAXFD && rtracked[fd] && hit("read", 0, fdname(fd))) return -1; return REAL(read)(fd, b, n); }
ssize_t pread64(int fd, void *b, size_t n, off64_t o) { if (fd >= 0 && fd < MAXFD && rtracked[fd] && hit("read", 0, fdname(fd))) return -1; return REAL(pread64)(fd, b, n, o); }
#include <dirent.h>
DIR *opendir(const char *p) { char rel[PATH_MAX]; if (reads_on() && in_scope(AT_FDCWD, p, rel, sizeof rel) && access(p, F_OK) == 0 && hit("opendir", 0, rel)) return NULL; return REAL(opendir)(p); }
ssize_t write(int fd, const void *b, size_t n) { if (is_tracked(fd) && hit("write", 1, fdname(fd))) return -1; return REAL(write)(fd, b, n); }
ssize_t pwrite(int fd, const void *b, size_t n, off_t o) { if (is_tracked(fd) && hit("write", 1, fdname(fd))) return -1; return REAL(pwrite)(fd, b, n, o); }
ssize_t pwrite64(int fd, const void *b, size_t n, off64_t o) { if (is_tracked(fd) && hit("write", 1, fdname(fd))) return -1; return REAL(pwrite64)(fd, b, n, o); }
ssize_t writev(int fd, const struct iovec *v, int c) { if (is_tracked(fd) && hit("write", 1, fdname(fd))) return -1; return REAL(writev)(fd, v, c); }
ssize_t copy_file_range(int in, off64_t *oi, int out, off64_t *oo, size_t n, unsigned f) { if (is_tracked(out) && hit("write", 1, fdname(out))) return -1; return REAL(copy_file_range)(in, oi, out, oo, n, f); }
ssize_t sendfile(int out, int in, off_t *o, size_t n) { if (is_tracked(out) && hit("write", 1, fdname(out))) return -1; ssize_t (*p)(int, int, off_t *, size_t) = dlsym(RTLD_NEXT, "sendfile"); return p(out, in, o, n); }
ssize_t sendfile64(int out, int in, off64_t *o, size_t n) { if (is_tracked(out) && hit("write", 1, fdname(out))) return -1; ssize_t (*p)(int, int, off64_t *, size_t) = dlsym(RTLD_NEXT, "sendfile64"); return p(out, in, o, n); }
int ftruncate(int fd, off_t l) { if (is_tracked(fd) && hit("write", 1, fdname(fd))) return -1; return REAL(ftruncate)(fd, l); }
int ftruncate64(int fd, off64_t l) { if (is_tracked(fd) && hit("write", 1, fdname(fd))) return -1; return REAL(ftruncate64)(fd, l); }
int fallocate(int fd, int m, off_t o, off_t l) { if (is_tracked(fd) && hit("write", 1, fdname(fd))) return -1; return REAL(fallocate)(fd, m, o, l); }
int posix_fallocate(int fd, off_t o, off_t l) { if (is_tracked(fd) && hit("write", 1, fdname(fd))) return ENOSPC; return REAL(posix_fallocate)(fd, o, l); }
static int sync_hit(int fd) {
if (is_tracked(fd)) return hit("sync", 1, fdname(fd));
char link[64], p[PATH_MAX], rel[PATH_MAX]; // a directory (or a file opened read-only) under the scope
snprintf(link, sizeof link, "/proc/self/fd/%d", fd);
ssize_t r = readlink(link, p, sizeof p - 1);
if (r <= 0) return 0;
p[r] = 0;
if (!in_scope(AT_FDCWD, p, rel, sizeof rel)) return 0;
char what[PATH_MAX + 8]; snprintf(what, sizeof what, "dir:%s", rel);
return hit("sync", 1, what);
}
int fsync(int fd) { if (sync_hit(fd)) return -1; return REAL(fsync)(fd); }
int fdatasync(int fd) { if (sync_hit(fd)) return -1; return REAL(fdatasync)(fd); }
int fchmod(int fd, mode_t m) { if (is_tracked(fd) && hit("chmod", 0, fdname(fd))) return -1; return REAL(fchmod)(fd, m); }
int rename(const char *a, const char *b) { char rel[PATH_MAX]; if (in_scope(AT_FDCWD, b, rel, sizeof rel) && hit("rename", 0, rel)) return -1; return REAL(rename)(a, b); }
int renameat(int da, const char *a, int db, const char *b) { char rel[PATH_MAX]; if (in_scope(db, b, rel, sizeof rel) && hit("rename", 0, rel)) return -1; return REAL(renameat)(da, a, db, b); }
int renameat2(int da, const char *a, int db, const char *b, unsigned f) { char rel[PATH_MAX]; if (in_scope(db, b, rel, sizeof rel) && hit("rename", 0, rel)) return -1; return REAL(renameat2)(da, a, db, b, f); }
int unlink(const char *p) { char rel[PATH_MAX]; if (in_scope(AT_FDCWD, p, rel, sizeof rel) && hit("unlink", 0, rel)) return -1; return REAL(unlink)(p); }
int unlinkat(int d, const char *p, int f) { char rel[PATH_MAX]; if (in_scope(d, p, rel, sizeof rel) && hit("unlink", 0, rel)) return -1; return REAL(unlinkat)(d, p, f); }
int rmdir(const char *p) { char rel[PATH_MAX]; if (in_scope(AT_FDCWD, p, rel, sizeof rel) && hit("unlink", 0, rel)) return -1; return REAL(rmdir)(p); }
int mkdir(const char *p, mode_t m) { char rel[PATH_MAX]; if (in_scope(AT_FDCWD, p, rel, sizeof rel)) { struct stat st; if (stat(p, &st) != 0 && hit("mkdir", 1, rel)) return -1; } return REAL(mkdir)(p, m); }
int mkdirat(int d, const char *p, mode_t m) { char rel[PATH_MAX]; if (in_scope(d, p, rel, sizeof rel) && hit("mkdir", 1, rel)) return -1; return REAL(mkdirat)(d, p, m); }
int link(const char *a, const char *b) { char rel[PATH_MAX]; if (in_scope(AT_FDCWD, b, rel, sizeof rel) && hit("link", 0, rel)) return -1; return REAL(link)(a, b); }
int linkat(int da, const char *a, int db, const char *b, int f) { char rel[PATH_MAX]; if (in_scope(db, b, rel, sizeof rel) && hit("link", 0, rel)) return -1; return REAL(linkat)(da, a, db, b, f); }
int symlink(const char *a, const char *b) { char rel[PATH_MAX]; if (in_scope(AT_FDCWD, b, rel, sizeof rel) && hit("link", 1, rel)) return -1; return REAL(symlink)(a, b); }
int symlinkat(const char *a, int d, const char *b) { char rel[PATH_MAX]; if (in_scope(d, b, rel, sizeof rel) && hit("link", 1, rel)) return -1; return REAL(symlinkat)(a, d, b); }
int chmod(const char *p, mode_t m) { char rel[PATH_MAX]; if (in_scope(AT_FDCWD, p, rel, sizeof rel) && hit("chmod", 0, rel)) return -1; return REAL(chmod)(p, m); }
int fchmodat(int d, const char *p, mode_t m, int f) { char rel[PATH_MAX]; if (in_scope(d, p, rel, sizeof rel) && hit("chmod", 0, rel)) return -1; return REAL(fchmodat)(d, p, m, f); }Agent mode. """mkproj.py <dir>: an agent-mode npm project, two packages of two files each, records made by hand.
State: not applied (installed files hold the 'before' bytes); both blobs of every file in .socket/blobs."""
import hashlib, json, os, sys
root = sys.argv[1]
def gh(b): return hashlib.sha256(b"blob %d\0" % len(b) + b).hexdigest()
def w(p, b):
os.makedirs(os.path.dirname(p), exist_ok=True); open(p, "wb").write(b)
w(f"{root}/package.json", json.dumps({"name": "app", "version": "1.0.0", "dependencies": {"left-pad": "1.3.0", "right-pad": "1.0.1"}}, indent=2).encode())
patches = {}
for i, (name, ver) in enumerate((("left-pad", "1.3.0"), ("right-pad", "1.0.1"))):
pkg = f"{root}/node_modules/{name}"
w(f"{pkg}/package.json", json.dumps({"name": name, "version": ver, "main": "index.js"}, indent=2).encode())
files = {}
for fn in ("index.js", "lib/util.js"):
before = (f"// {name} {fn}\nmodule.exports = function () {{ return 'upstream' }}\n" + "// pad\n" * 4000).encode()
after = before + b"// SOCKET_PATCHED\n"
w(f"{pkg}/{fn}", before)
for b in (before, after): w(f"{root}/.socket/blobs/{gh(b)}", b)
files[f"package/{fn}"] = {"beforeHash": gh(before), "afterHash": gh(after)}
patches[f"pkg:npm/{name}@{ver}"] = {
"uuid": f"1111111{i}-2222-4333-8444-55555555555{i}", "exportedAt": "2026-11-01T00:00:00.000Z", "files": files,
"vulnerabilities": {f"GHSA-aaaa-bbbb-ccc{i}": {"cves": [f"CVE-2026-000{i}"], "summary": "s", "severity": "high", "description": "d"}},
"description": "d", "license": "MIT", "tier": "free"}
w(f"{root}/.socket/manifest.json", (json.dumps({"patches": patches}, indent=2) + "\n").encode())"""mkcargo.py <dir>: an agent-mode Cargo project that builds from a `cargo vendor` directory, two crates of two
patched files each, records made by hand. State: not applied."""
import hashlib, json, os, sys
root = sys.argv[1]
def gh(b): return hashlib.sha256(b"blob %d\0" % len(b) + b).hexdigest()
def sha(b): return hashlib.sha256(b).hexdigest()
def w(p, b):
os.makedirs(os.path.dirname(p), exist_ok=True); open(p, "wb").write(b if isinstance(b, bytes) else b.encode())
w(f"{root}/Cargo.toml", '[package]\nname = "app"\nversion = "0.1.0"\nedition = "2021"\n\n[dependencies]\nalpha = "1.0.0"\nbeta = "1.0.0"\n')
w(f"{root}/src/main.rs", 'fn main() { println!("{} {} {} {}", alpha::value(), alpha::util::value(), beta::value(), beta::util::value()); }\n')
w(f"{root}/.cargo/config.toml", '[source.crates-io]\nreplace-with = "vendored-sources"\n\n[source.vendored-sources]\ndirectory = "vendor"\n')
lock = 'version = 4\n\n'
patches = {}
names = ("alpha", "beta")
for i, name in enumerate(names):
d = f"{root}/vendor/{name}"
files = {"Cargo.toml": f'[package]\nname = "{name}"\nversion = "1.0.0"\nedition = "2021"\n'.encode()}
rec = {}
for fn, body in (("src/lib.rs", 'pub mod util;\npub fn value() -> &\'static str { "%s" }\n'), ("src/util.rs", 'pub fn value() -> &\'static str { "%s" }\n')):
before = (body % "upstream").encode(); after = (body % "PATCHED").encode()
files[fn] = before
for b in (before, after): w(f"{root}/.socket/blobs/{gh(b)}", b)
rec[fn] = {"beforeHash": gh(before), "afterHash": gh(after)}
for fn, b in files.items(): w(f"{d}/{fn}", b)
pkgsum = sha(name.encode() * 7)
w(f"{d}/.cargo-checksum.json", json.dumps({"files": {fn: sha(b) for fn, b in sorted(files.items())}, "package": pkgsum}))
lock += f'[[package]]\nname = "{name}"\nversion = "1.0.0"\nsource = "registry+https://github.com/rust-lang/crates.io-index"\nchecksum = "{pkgsum}"\n\n'
patches[f"pkg:cargo/{name}@1.0.0"] = {"uuid": f"1111111{i}-2222-4333-8444-55555555555{i}", "exportedAt": "2026-11-01T00:00:00.000Z", "files": rec,
"vulnerabilities": {f"GHSA-aaaa-bbbb-ccc{i}": {"cves": [f"CVE-2026-000{i}"], "summary": "s", "severity": "high", "description": "d"}},
"description": "d", "license": "MIT", "tier": "free"}
lock += '[[package]]\nname = "app"\nversion = "0.1.0"\ndependencies = [\n "alpha",\n "beta",\n]\n'
w(f"{root}/Cargo.lock", lock)
w(f"{root}/.socket/manifest.json", json.dumps({"patches": patches}, indent=2) + "\n")Vendored mode. The matrix test of the entry of 08:55Z of 11-30 ( Hosted mode. Per k: L180 by hand. A vendored copy of the Maven fixture ( Needs a person
|
|
[agent] 2026-12-04: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 05:24Z: #2453, #2458 and #2461, each No lead was marked
PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL184, confirmed, filed #2501 (
The real SDK (.NET 8.0.428, The cause is in L185, confirmed, on #2498 (a comment): a ledger save drops every field it does not know, at every level. The ten vendored fixtures, one unknown field at each of six levels of The released pair: 5.2.0 added
It fails closed and heals on the next online L186, true on
With the unknown kind in the place of a record the backend knows (nine ecosystems, 37 records), one row is unsafe: pnpm's 5.2.0 added five kinds. The released pairs, each a project
So no project two releases share is broken by this today. The differences are #989's four keep policies (the contract documents them per backend), met by an input only a later release can write. Not filed; #989 is the place if a release adds a kind to Cargo, Go or pnpm's workspace file. L187, rejected: an undo's result depends on its order in other ecosystems. Nine fixtures (npm, pnpm, Cargo, Go, Seen and not filed:
No issue closed. No lead is marked Areas examined
Lessons
The fixturesBoth releases. Vendored projects on disk. A test file under #!/bin/bash
# run.sh <fixture-dir> <binary> <args...>: a binary in an exported fixture, hermetic
D=$1; BIN=$2; shift 2
( cd "$D/proj" && env -i PATH="$PATH" HOME="$D/store/home" CARGO_HOME="$D/store/cargo-home" GOMODCACHE="$D/store/modcache" \
MAVEN_REPO_LOCAL="$D/store/m2" NUGET_PACKAGES="$D/store/nuget" SOCKET_NO_CONFIG=1 SOCKET_NO_UPDATE_CHECK=1 SOCKET_TELEMETRY_DISABLED=1 \
$(grep '^export ' "$D/env.sh" | sed "s/^export //; s/'//g") "$BIN" "$@" )More shapes from the same fixtures, written into
The platform gem and Rush. A copy of The merged project of L185. The platform gem's Unknown fields and kinds. Python over The SDK. Needs a person
|
|
[agent] 2026-12-04: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 07:28Z: #2453, #2458 and #2461, each No lead was marked
PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL190, confirmed, filed #2503 (
pip's column is Two copies answer "where does a comment start": It is the fifth kind as well: #1249 (40de3d5, a dangling L188, rejected: the npm range matcher disagrees with npm. L189, rejected: the PEP 440 module disagrees with L191, rejected: the L192, rejected: the Gradle version order disagrees with Gradle. 162 version strings (Maven Central's qualifier habits, the Seen and not filed:
No issue closed. No lead is marked Areas examined
Lessons
The fixturesA port alone. The oracles.
The pip project. pip itself. A wheel of three files written with Needs a person
|
|
[agent] 2026-12-04: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 09:21Z: #2453, #2458 and #2461, each No lead was marked
PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL197, confirmed, filed #2504 (
Without the constraint pip installs 7.0.0, the newest wheel in the directory, so the constraint is what selects 6.2.8. The human output of the second row is "Found 19 packages (19 python)", "No patches available for installed packages." The other three modes of What the run with an environment writes ( It is the fifth kind as well: d63ae5f (#412, #523), b762f41 (#1028) and 40de3d5 (#1249) each fixed a requirements line the lock-only reader and pip read differently. The L193, rejected: Maven's version order or ranges differ from Maven's. L194, rejected: Composer's version identity differs from Composer's. L195, rejected: the pom coordinate reader names another artifact than the pom's path. 2,087 poms of the same 175 artifacts: 1,457 read as the coordinates of their path, 630 read as nothing (a version inherited from the parent, or one line holding several elements), for which the crawler takes the path, and none read as other coordinates. L196, rejected: the Seen and not filed:
No issue closed. No lead is marked Areas examined
Lessons
The fixturesA port alone. As in the last entry: a scratch crate whose The oracles.
The corpora. The pip project. Needs a person
|
|
[agent] 2026-12-04: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 11:27Z: #2453, #2458 and #2461, each No lead was marked
PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL198, confirmed, filed #2505 ( Through the binary, the pnpm project of the bench made into a workspace with members
On the next root install pnpm 11.29.0 and 12.26.0 print that the settings in the member's new file "do not apply, because tests/integration is a project of this workspace". After the third row It is the fifth kind as well: #880, #881, #492, #1094 and #1101 each closed one of these outcomes, and each asks L199, confirmed, filed #2506 (
The root run the message names exits 0 with Seen and not filed:
No issue closed. No lead is marked Areas examined
Lessons
The fixturesThe reader alone. A scratch crate whose The tree. 33 directories with a The oracles.
The pnpm workspace. The dot-directory workspaces. A fix on trial. Edit the constant, Needs a person
|
|
[agent] 2026-12-04: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 13:50Z: #2453, #2458 and #2461, each No lead was marked
PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL201, confirmed, filed #2507 ( Through the binary, the Cargo project of the bench made into a workspace of two members, the second depending on the patched crate,
The warning says the member is "a path package whose Cargo.toml is outside the project or not rewritable" and names vendored mode. Both halves of the reason are false for these rows. The skip is safe, but hosted mode cannot patch any crate such a member uses.
A real project has the layout: the published crate It is the fifth kind as well: #1833 (in #1866) taught this walk the A trial on a build of L200, rejected: the uv workspace reader lists another set of members than uv. 301
Seen and not filed:
No issue closed. No lead is marked Areas examined
Lessons
The fixturesThe uv reader alone. A scratch crate whose The uv tree. 20 projects ( The uv oracle. The Cargo walk alone. The Cargo oracle. The Cargo workspace. The trial. Needs a person
|
|
[agent] 2026-12-04: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 15:25Z: #2453, #2458 and #2461, each No lead was marked
PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL202, confirmed, filed #2509 (
The same The reader alone against Hatch 1.18.2, per environment that Hatch loads and that declares a workspace: of 371 in 600 workspaces whose specs include the fields, 299 are equal and in 72 Hatch lists a member the reader does not, each through It is the fifth kind: #505's fix (22162d7, #1724) took a review follow-up for "specs using the L203, confirmed, filed #2510 ( Through the binary, the bench's hosted Cargo project at
After the last row Over the generated trees the check gives cargo's answer for all 2,312 manifests cargo loads (2,092 roots, 220 members). Of the 1,936 cargo refuses, the check says "root" for 39, each below a package with a pointer. It is the fifth kind: abb5787 (#417, #590) and e3aa39a (#2077) each taught this check one more branch of cargo's lookup. It is narrow: the wrong outcome needs the pointer, a path crate below it, a run from that crate and a stray lock. The plan: an ancestor with a pointer ends the walk with the refusal; about 15 production lines. L204, rejected: the vlt reader lists another set of members than vlt. 578
By reading, none reaches a false success: Seen and not filed:
No issue closed. No lead is marked Areas examined
Lessons
The fixturesThe probes. Appended to The Hatch oracle. In a venv with The Hatch tree. A checkout with the root at Hatch through the binary. A temporary copy of the #505 test in The Cargo trees. 14 directories ( The pointer layout through the binary. vlt. Needs a person
|
|
[agent] 2026-12-04: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 17:14Z: #2453, #2458 and #2461, each No lead was marked
PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL206, confirmed, filed #2512 ( #2499 puts that binary back from the build's backup first, but not when the backup lists a build input the earlier record changed and the copy did not hold ( The real flow, day 1 with the ruby gem's patch alone and day 2 with the platform's beside it, each
In the failing rows It is the fifth kind: the fifth row passes on The files are real: the ruby gem of nokogiri 1.18.9 packs 55 files its L207, rejected: the two L208, out of charter: three of the gates #2499 added can be removed without a test failing. 13 mutants in
The last two were run on L205, rejected: the glibc spelling rule has drifted. Seen and not filed:
No issue closed. No lead is marked Areas examined
Lessons
The fixturesThe driver. A Python script that lays the tree of The stand-in API. 5.2.0. The test. Appended to The mutants. Each gate takes The failed put-back. The driver's tree and both binaries under nokogiri's file lists. Needs a person
|
|
[agent] 2026-12-04: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 19:23Z: #2453, #2458 and #2461, each No lead was marked
PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL209, confirmed, filed #2513 (
Maven says "Could not find artifact org.slf4j:slf4j-api:jar:1.7.36-socket.4d5e6f70 in central", for the plugin ("Plugin org.apache.maven.plugins:maven-antrun-plugin:3.1.0 or one of its dependencies could not be resolved") or for the project. In the fourth row The golden fixture It is the fifth kind: #259 (p1, a v5 blocker) was these outcomes, and its fix (009dca3, #1327) found the sections with this scanner; the test beside it has no section that holds its own name. It is the third kind (a green scan, a red build), and the first: the reactor planner reads a pom as a tree. The second row's pom as the one module of a two-pom reactor, scanned from the root, has its The shape is in published poms: The plan on the issue: pair an open tag with its own close tag by counting the open tags of its name in between, in L210, rejected: the hosted
L211, rejected: a quote inside a Groovy slashy string makes the hosted Gradle edit lose its own line. Seen and not filed:
No issue closed. No lead is marked Areas examined
Lessons
The fixturesThe poms. In #2513, whole: The stand-in. A Python The runs. The golden case. The pairing comparator. Python: blank comments and CDATA, list the open and close tags of a name, pair them flat (an element ends at the next close tag; an open tag inside it is skipped) and balanced (a stack), and report the
Gradle. Needs a person
|
|
[agent] 2026-12-04: architecture refactor
ChosenNo PR this run. Three routine PRs were open at the start and at 21:32Z: #2453, #2458 and #2461, each No lead was marked
PRNone opened. #2453, #2458 and #2461 await review. No code was pushed anywhere. Leads and issuesL212, confirmed, filed #2516 ( Real uv 0.11.32,
#1138's test over the nested layout, appended to The reader alone against uv, 1,500 workspaces in the spellings uv reads (1,035 load; 7,732 directories with a
It is the fifth kind and the third. The rule came in a follow-up of #1138's fix (2a11629, #1335) whose message says uv "does not install it from an outer workspace". That is uv's view from the directory. It does not hold when the outer workspace lists the directory, and that is the only case where the rule changes the answer. The rule's unit test uses a root with The shape is published: the root The plan on the issue: drop the rule (three lines), read L213, confirmed, a row of #2516: a member the root lists through L214, confirmed, a step of #2516's plan: uv matches an L215, rejected: the reader lists a member uv does not, or the reverse, through the pattern's spelling. In the first 300 workspaces (228 load), whose patterns included brace sets, Seen and not filed:
No issue closed. No lead is marked Areas examined
Lessons
The fixturesThe real workspace. A root ( The runs. Two tests appended to The reader probe. The generator. Python, seeded. One to three top directories of Older uv. 0.4.30, 0.6.17, 0.8.24 as above; Airflow. 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: 180 open and 166 closed
arch-auditissues · 3 open and 122 mergedarch-refactorPRs.arch-refactor· issues labelledarch-audit· decisions neededRendered 2026-12-04 21:34 UTC (ledger
a497014e) 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