docs+test: the young-run window in SERVER-MODE/LANES; run.test plants its link in the real drop dir
run.test.js hardcoded /tmp/agenthub-drops-<uid>, which drops left for <data dir>/drops long ago — it passed only while an old build's folder survived in /tmp (gone after a reboot). Full suites: server 2887/2887, client 1250/1250.
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
+4
-1
@@ -806,7 +806,10 @@ agenthub users provision alice # the Linux account only (a user made before
|
||||
`~/.config/agenthub/settings.env`) but lacks the unit's
|
||||
`CAP_DAC_READ_SEARCH` cannot stat a member's 0700 `.agenthub/tmux`; from
|
||||
v2.7.3 on that `EACCES` counts as "maybe running" and the member's list is
|
||||
asked through sudo, never read as "no panes".
|
||||
asked through sudo, never read as "no panes". And a run younger than 20 s
|
||||
is never ended by any server: only the server that started a pane writes it
|
||||
into its own cached tmux list, so another one on the same database had not
|
||||
listed it yet and ended a Codex pane seconds after its start.
|
||||
- **Update now** under the system unit restarts through
|
||||
`sudo -n systemctl restart --no-block agenthub.service` (from v2.7.3). An
|
||||
older build started a detached replacement instead, which kept the port
|
||||
|
||||
@@ -335,17 +335,15 @@ describe("GET /api/run/drop/:name", () => {
|
||||
});
|
||||
|
||||
it("serves no file that is not a dropped image or text file", async () => {
|
||||
const link = path.join(
|
||||
os.tmpdir(),
|
||||
`agenthub-drops-${os.userInfo().uid}`,
|
||||
"fedcba9876543210.png"
|
||||
);
|
||||
fs.rmSync(link, { force: true });
|
||||
fs.symlinkSync("/etc/passwd", link);
|
||||
const pdf = await fetchJson("/api/run/drop-file?name=a.pdf", {
|
||||
method: "POST",
|
||||
raw: { type: "application/pdf", buf: Buffer.from("%PDF") },
|
||||
});
|
||||
// Planted in the real drop dir (the one this drop just made), not a
|
||||
// guessed path: `<data dir>/drops` replaced `/tmp/agenthub-drops-<uid>`.
|
||||
const link = path.join(path.dirname(pdf.body.path), "fedcba9876543210.png");
|
||||
fs.rmSync(link, { force: true });
|
||||
fs.symlinkSync("/etc/passwd", link);
|
||||
for (const name of [
|
||||
path.basename(pdf.body.path), // a drop, but no image
|
||||
"0123456789abcdef.png", // the right shape, never dropped
|
||||
|
||||
Reference in New Issue
Block a user