Skip to content

Commit aa536ea

Browse files
committed
fix: stabilize daemon shard admission and userns checks
1 parent 9d93dff commit aa536ea

3 files changed

Lines changed: 33 additions & 8 deletions

File tree

‎docs/UPSTREAM_308_CANDIDATE_AUDIT_20260912.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,34 @@ build, and the selected pipeline/registry/import/daemon/CLI focused suites.
130130

131131
The next Ponytail candidate is the earlier remaining Cypher correctness pair
132132
`25a7aacc -> afc948ba`. Do not reselect the completed source hashes above.
133+
134+
## MCP refresh — 34 new non-merge commits (2026-09-13)
135+
136+
Source window: the next 34 non-merge commits at `codebase-memory-mcp` `main`,
137+
from `3c854ae2` through `09c0e88a`. This refresh is a candidate list only;
138+
it does not authorize a bulk merge. Ponytail screening excluded formatting,
139+
tests-only, documentation-only, dependency-only, represented, MCP-only,
140+
OpenHands, and already-tracked work before selecting the following verticals.
141+
142+
| Priority | Upstream commit(s) | Disposition | Why / dependency boundary |
143+
|---|---|---|---|
144+
| 1 | `91e31211` | **adapt — high value** | Closes the pipeline staging create-to-lock race. Shared `src/pipeline/**`; carry the full lock-before-visible change and regression test, not a partial cherry-pick. |
145+
| 2 | `9a460b38` | **adapt — high value** | Moves SHA-256 message-schedule scratch out of a per-block stack frame, reducing ASan use-after-return overhead. Shared foundation code; retain existing digest vectors. |
146+
| 3 | `09c0e88a -> 1ad52f5f` | **adapt — security CI** | Fails CodeQL alert reads closed and grants reusable-workflow permissions. Confirm this fork's callers/workflow names first; do not add upstream links or Jenkins behavior. |
147+
| 4 | `8c2692c1` | **clean — dependency security** | Bumps Graph UI Vitest to 4.1.11. Select only with package-lock verification. |
148+
| 5 | `fa99ff64` | **adapt — test throughput** | Reduces a proven idle wait in the CLI activation negative probe and marks `cli` as slow for scheduler budgeting. Reassess against this fork's activation fixture before porting. |
149+
| 6 | `013e1f7e` | **adapt — large CLI safety** | Prevents an activation targeting another HOME/cache namespace from draining the active cohort. The upstream diff crosses excluded MCP supervisor code, so port only CLI-neutral cohort-scope logic after caller mapping. |
150+
151+
### Represented, rejected, or not independently useful
152+
153+
- Already represented/integrated: `52701625`, `6091db71`, `0567dc70`,
154+
`8116672a`, `df579830`, `61884951`, `4fa11d1a`, `557cb010`, `91c63be5`,
155+
`8134712d`, `ecfb9642`, `a3c24a71`, `7bf366f6`, `8135be28`, and `3c854ae2`.
156+
- MCP-only or MCP-coupled: `f6a29270`, `9ef7da8c`, `e45d7051`, `208ee99c`,
157+
`262ab012`, and `3a4160b4`; retain the CLI fork exclusion.
158+
- No standalone value: `eeff3f19`, `e65bc6b7`, `7e73b48e` (format/docs),
159+
`92cb3b9a` (test-only), and `aacf96a2` (installer wording only).
160+
161+
The refresh adds six potential verticals: two core safety/performance fixes,
162+
one CI security pair, one dependency update, one test-throughput adaptation,
163+
and one large scoped activation safety adaptation.

‎src/daemon/application.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1713,7 +1713,7 @@ static size_t application_worker_memory_slice_locked(cbm_daemon_application_t *a
17131713
active = 1;
17141714
if (active_jobs_out)
17151715
*active_jobs_out = active;
1716-
return application->aggregate_memory_budget_bytes / active;
1716+
return application->aggregate_memory_budget_bytes / application->physical_job_limit;
17171717
}
17181718

17191719
/* Compare the effective index request, not its JSON spelling. yyjson's deep

‎src/daemon/ipc.c‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,11 +1546,6 @@ static uid_t posix_compute_ancestor_overflow_uid(void) {
15461546
return (uid_t)overflow;
15471547
}
15481548

1549-
static uid_t g_posix_overflow_cached = POSIX_NO_OVERFLOW_UID;
1550-
static pthread_once_t g_posix_overflow_once = PTHREAD_ONCE_INIT;
1551-
static void posix_overflow_init_once(void) {
1552-
g_posix_overflow_cached = posix_compute_ancestor_overflow_uid();
1553-
}
15541549
#endif /* __linux__ */
15551550

15561551
static uid_t posix_ancestor_overflow_uid(void) {
@@ -1560,8 +1555,7 @@ static uid_t posix_ancestor_overflow_uid(void) {
15601555
}
15611556
#endif
15621557
#if defined(__linux__)
1563-
(void)pthread_once(&g_posix_overflow_once, posix_overflow_init_once);
1564-
return g_posix_overflow_cached;
1558+
return posix_compute_ancestor_overflow_uid();
15651559
#else
15661560
return POSIX_NO_OVERFLOW_UID;
15671561
#endif

0 commit comments

Comments
 (0)