Commit Graph
2 Commits
Author SHA1 Message Date
Kevin Veen-BirkenbachandClaude Opus 5.5 8572a48f8c fix(orchestrator): never follow a hub-planted link out of the client spool directories
The offices and cleanup executors drained jobs and results through paths the hub can write, so a symlinked jobs, results or spool directory, a linked job file or a linked subdirectory let a root or host unit read, write or delete outside the spool. verifier.drain() now opens every directory from / one name at a time with O_NOFOLLOW: a link is followed only by a non-root unit and only while every directory entered so far is root's and nobody else can write it; the final directory must be the unit's own and not group or world writable, else the cycle refuses and changes nothing. Reads, writes and removals run relative to the open directory fds; a removed subdirectory goes through shutil.rmtree with dir_fd, which refuses a link swapped in. A result that cannot be written keeps its job as results/.<id>.unreported so it never runs again, and a job that can be neither kept nor removed prints one line and leaves the cycle going.

MEDUSA: 2 findings accepted after an independent review, 0 true positives: WEB-PATH-002 at verifier.py:146 (OSError.filename in a refusal message, no file access uses it), B105 at cleanup.py:53 (TOKEN_NEEDED is a refusal sentence, accepted before on 2026-11-12).

🎯 Fix: 92 %
💥 Break: 5 %
💸 Cost: 100 %
⏱️ Time: 100 %
🛡️ Security: 100 %
🏆 Score: 87
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 09:04:29 +00:00
Kevin Veen-BirkenbachandClaude Opus 5.5 4540494c30 feat(orchestrator): hierarchy view from council offices with a separate agent order
The Agents views gain a Hierarchie view: an org chart of the chair and
the line offices read from the council claims. The operator appoints,
hands over and recalls an office there; the page signs each change with
the passkey and a host unit (client/offices.py, offices path unit)
verifies the signature, removes a live holder itself and runs a plain
council.py claim for the successor. council.py loses the --operator
flag, so no agent can override a live holder.

The agent order is now separate from task priority: rasci.py agents
order stores it in agent-order.json beside the register through the
nofollow helpers and never writes a --prio pin. It only breaks ties of
equal task rank, also among the queue grants. The Hierarchie view edits
it as a drag list.

Host units run the installed skill scripts, so orchestrator.sh keeps the
offices unit off while the installed council.py, nofollow.py or rasci.py
differ from the tree. Job files, council files and hub records are read
with O_NOFOLLOW and O_NONBLOCK and size caps; nofollow.rewrite replaces
a claim without creating directories, so a beat never revives a released
office.

🎯 Fix: 92 %
💥 Break: 4 %
💸 Cost: 100 %
⏱️ Time: 79 %
🛡️ Security: 100 %
🏆 Score: 100
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 17:46:39 +00:00