Repository navigation
Conversation
Design Review (Opus 5.5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS This PR bundles a spawn-path cwd-identity pin with the folder authorization fence; every bound chat pays its cost, and on POSIX it covers only part of the window. Watch
Suggestions
[DESIGN-REVIEWED] 3324893 Description read[DESCRIPTION-READ] c297cbfacbd9d3aae15f9f70ff94070432da8064b0672f5d7b5bafea1bc30028 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — 🔴 BLOCKPremise-level review of First-Principles-Verdict: BLOCK The Windows spawn now refuses bound chats on reparse-point judgements nobody has run against a real OneDrive folder, and two large mechanisms go beyond the Goal. Not justified as shipped
What this change shipsInventory (9 items) — 4 justifiedIntent: stop anyone but the person from choosing where the person's folder chats run — a FIX.
BlockersUnverified Windows reparse-point premise on the bound-chat agent spawn path [FIRST-PRINCIPLES-REVIEWED] 3324893 Description read[DESCRIPTION-READ] 878dd0dbfbe4e532c39c5dcd5c68cd3dd11e16b9301cfabee8053ce70282b744 That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsAdvisory only: on Linux, bound projects now lose some PATH entries. FINDING — src/kiro_crew/acp/launch.py:1108 — on POSIX the tail now passes the verified hold as [OPUS-REVIEWED] 0f4116c Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
5b5458c to
f0b9bf2
Compare
f0b9bf2 to
8b79994
Compare
8b79994 to
5fbbfa7
Compare
5fbbfa7 to
f8a2130
Compare
f8a2130 to
79a6e2e
Compare
|
Per-head record addendum for d2f78a8 (Round 101). Design Review published BLOCK on this head at 07:08Z (comment 5812998773) where it had published PASS on the previous head, 7eafadb, whose content this head carries unchanged. The blocker is the Windows handle chain's write-sharing denial on every held ancestor (Rounds 87 to 89) and its clear condition is a live Windows run with a project under an active OneDrive sync root and under the user profile, or the chain ceasing to deny write sharing on ancestors (the record names the alternative the code itself defers, opening each child relative to the held parent handle). Its watch item is the standing scope question (the spawn-time identity fence as its own change), the same question First Principles blocks on. Both are the owner's decisions and are recorded here as such; nothing is argued or changed toward or against either, and no override is requested. The earlier records stand (6139934209 and the records it lists). |
|
Per-head record, Design Review on d2f78a8 (follows 6140466529). The Design Review block (5812998773) and the First Principles block are two lanes on the same subject, the spawn-time directory pin (#17395 names the deferral target), and that subject is the owner's decision; neither is fixed, overridden or argued in this round. One factual line on the blocker's premise: the Windows handle chain denies WRITE sharing only, so read handles on an ancestor (directory enumeration, change notification) do not conflict with the hold, and no live Windows run exists to settle which handles an active OneDrive sync root holds, so the premise is unverified in both directions. |
|
CI note on d2f78a8 (base 3791b79, main's tip at push time). Base proof: no main tip carrying #18649 has a completed run of its own yet (main's runs on the intermediate tips were cancelled by the next merge and the run on the tip, 38469765387, is behind the Actions backlog with no concluded Backend Lint failure), so this once the gate on the merged tree (lint, types, the black and comment-history ratchets, the brand gate, docs lint, 2,042 serial and 3,825 parallel tests, listed in the round note) stands in for the base proof. Reds on this head are read against main's own run on the base as it publishes: a red main shares there is inherited and cited by its log, not re-run. Two local-runner classes are known and are not this change's: test_acp_spawn_offload.py::TestRuntimeProjectedLaunchDocuments and code_review_sage's test_store_ancestor_chain.py fail on this runner on pristine main whose CI is green, like the test_mcp_cron_security descriptor-closed cases; CI judges them. The Design Review and First Principles blocks are the owner's open decision (the spawn-time directory pin; records re-posted for this head); PR Readiness and the readiness signal are red on them and on the standing change request (#17078). Carried over per head: |
|
CI note on d2f78a8: Dependency License Gate failed at 21:51:54Z with "Dependency review is not supported on this repository. Please ensure that Dependency graph is enabled", the repository setting fault seen before (two other fresh heads failed the same way in the same minutes, and fresh heads pass again since 21:57Z), not a dependency of this change; its run 38473647410 is re-run once now that the setting is back, and no file on this head is changed for it. |
|
CI note on d2f78a8: Opus 5.5 Review run 38473647473 attempt 1 failed closed at 22:20:40Z in its "Capture discovery candidates" step: the discovery pass ended after 23 turns with a 264 character result carrying no [OPUS-DISCOVERY] marker for this head (marker_in_assistant=false, no permission denials), so the gate refused to validate an unverified candidate list and published no verdict for this head (the lane's comment still names 0f4116c). A lane read fault, not a finding about the change: the run is re-run once in this change's own window; a second death of the same kind is cited here and left for a later hour's window. No file on this head is changed for it. |
|
Per-head record for d2f78a8 (Round 103): Design Review published CONCERNS on this head at 22:19Z (comment 5812998773, updated in place), an advisory verdict, where it had published BLOCK on the previous heads 0f4116c and 2a7fdad. What the lane says: two watch items on the spawn-time identity pin, that its cost (a bound chat spawns cold and the agent loses PATH entries inside the bound project, an activated .venv/bin among them) lands on the person's own bindings once only the person can set, clear or reroute a binding, clearing when the change names the threat that still reaches a person-made binding or limits those costs to the bindings that threat can reach; and that the change carries two things, the person-only gate with the UNC refusal and the spawn-identity machinery (cwd_identity on get_or_create, the Windows handle-chain walk, the hold spanning process creation at both ACP spawn sites), clearing when the pin ships as its own change or a live Windows run binds and spawns on a OneDrive placeholder project and on a Dev Drive mount; its suggestion is to land the gate and the UNC refusal first and judge the pin on its own once #17395 makes the by-name reads descriptor-relative. Both items are the standing scope question (split the pin out or keep it, the same question a maintainer's review 5484249734 asked), which is the owner's open decision; the live Windows run is the owner's as well. No code on this head changes for this verdict, nothing blocks, no override is requested and nothing is argued toward or against the items here. The earlier records stand (6155971485, 6155973864 and 6155975947, and the records they list). |
|
Per-head record for d2f78a8 (Round 103): First Principles Review published CONCERNS on this head at 22:19Z (comment 5813016080, updated in place; run 38473647492), an advisory verdict, where it had published BLOCK on the previous heads. What the lane says, under "Not justified as shipped": item 6, the spawn-time identity pin, is oversized against the frozen Goal (the Goal covers who may bind and the UNC refusal, not a directory swapped between check and spawn), makes every bound chat cold-start and drops PATH entries inside the project, and is still incomplete on POSIX by the change's own account (by-name reads stay open between verify and spawn, #17395); its subtraction is to remove cwd_identity, verified_hold and the spawn-hold plumbing in acp/client.py, acp/runtime.py, acp/launch.py, session_allocation.py, state.py and the identity functions in sandbox.py and defer them to #17395, items 7 and 8 going with it, clearing when the mechanism is removed or a human amends the Goal; item 4, the steering commit widens the #11827 steering_dirs gate, its subtraction being its own change, clearing the same way; item 10, the 401 stale_session_reauth answer is declared only in the commit message. Items 6 and 4 are the standing scope question (split the pin and the steering commit out or keep them), which is the owner's open decision, as a maintainer's review 5484249734 asked; item 10 names the description, not the code. No code on this head changes for this verdict, nothing blocks, no override is requested and nothing is argued toward or against the items here. The earlier records stand (6155971485, 6155973864 and 6155975947, and the records they list). |
…paths
A sidebar folder's project_dir is what the gateway hands every chat opened in
the folder as its project, cwd and steering root — for the person's folders,
the person's chats. Four things about it were unfenced. Any caller the folder
routes admitted — an app's own token, any internal caller posting the field —
could set or clear a binding the person's chats then launched in. An agent
could reparent a folder under the person's bound folder, or out from under one,
rebinding every chat filed inside it — the same reach as changing the binding,
through the tree, and file the person's chat into a bound folder — the same reach
through filing. And a request-named project_dir was realpath'd without a UNC
check, so on a Windows gateway a `\\host\share` text — or a local link whose
target is one — opened an SMB connection to a host the text's author chose.
Who is the person is ONE POSITIVE bit at the folder routes, `_is_the_person`:
`request["is_dashboard_user"] is True`, the stamp the token middleware sets only
when the person's own cookie or session token validated (the sidebar's Folder
settings). The internal-secret transport (the managed MCP set, so every agent
session's tool call: an ordinary dashboard session's, a crew member's, an
app's, a cron's, a subagent's, a channel session's) never sets it, an app's own
token sets it False, and a request that met no middleware is refused rather
than admitted — no fence keys on the absence of another stamp, and no caller is
sorted by its key. A non-person caller's project_dir is refused whole, at
create and on the PATCH, set or clear, before the path is looked at
(`_agent_binding_refusal`, 403 `folder_project_dir_forbidden`, audited under
`app_isolation` against the caller's principal or its session key); the
person's meets the validators alone, as before. No MCP tool carries
project_dir: `chat_folder_create` is unchanged from main and there is no update
verb. What a binding confers is main's, unchanged: the nearest ancestor's
binding, for every chat filed beneath it.
The same bit keys two more rules. A non-person caller's reparent may not change
the stored binding the moved subtree resolves (`_move_changes_inherited_binding`
over `_inherited_project_dir`, same 403, decided under the store lock; a folder
carrying its own binding is exempt because nearest wins, and a move between
places that confer the same binding lands), nor the accumulated steering chain
with each declarer's owner (`_inherited_steering_dirs`, the steering gate's
403). The steering_dirs declaration gate itself (#11827) is widened in the
commit after this one, so a bisect of a steering refusal lands there.
The same two comparisons fence the filing route, the third way a chat comes
under a binding: `PATCH /api/chat/slots/{slot}/folder` (behind
`chat_folder_move_session` and `chat_folder_file_self`) wrote `slot.folder_id`
into any folder behind transcript-ownership checks alone, and a binding and
steering reach a chat through the folder it is filed in. A non-person filing
that would change what the session inherits is refused before the write, under
the slot's transaction lock, with the same two codes; a filing between places
that confer the same binding and steering lands; the person files anywhere.
The UNC gate is scoped to every principal OTHER than the person. The probe it
prevents is a caller other than the operator steering the gateway onto a host of
that caller's choosing, and that threat does not exist when the operator picks a
path for the operator's own gateway: a person could bind a project on a share
before this change and still can, resolved as main did. `_admit_project_dir`
takes the request's positive stamp and routes the person to
`_validate_project_dir` — main's own resolution by name — and everyone else to
`_admit_agent_project_dir`, the fenced path; the slot project endpoint has the
same two arms; the `set_project` directive is an agent's tool and is fenced
whole; the scaffold's scan root and create carry the stamp through. The read
path is main's for every stored value and runs neither half: only the person
binds a folder, so every stored binding is the operator's own choice. The gate
has two halves. `project_dir_unc_refusal` is lexical and admission-only: it runs
before the first filesystem call wherever a non-person principal names a
directory, on every host. `project_dir_link_target_refusal` closes
the gap one link away: a resolve follows every link in a path, and on a
Windows gateway it is itself the SMB probe when a link's target is a share, so
before anything follows a link the repo's one link-target screen —
`hooks.link_screen`, the walk `validate_file_path` already runs for file reads
(through the `screen_link_targets` wrapper, unchanged), its Windows-only target
normalizer given a POSIX branch and its refusal given a cause — reads each link
on the way with `os.readlink`, never following it, and hands back the path
re-spelled through every link it read. That screened spelling, never the
original, is what is resolved next, and never by name:
`pinned_fs.real_dir_path_pinned` opens every component without following a
link and reads the real path off the directory it holds (`fd_real_path`) — an
`openat` chain under `O_NOFOLLOW` on POSIX; on Windows a root-first chain of
`platform_compat.pin_directory` handles opened with
`FILE_FLAG_OPEN_REPARSE_POINT` and held without `FILE_SHARE_DELETE` until the
path is read, so nothing above a held component can be renamed or re-pointed
while the walk runs (the hold the issue_radar unit-order writer already takes)
— so a component swapped for a link between the screen and the open is refused
at the open on every host, and a host that pins neither way fails closed rather
than falling back to a by-name realpath. `pin_directory` gains
`allow_filter_reparse`: the project pin reads the reparse tag off the open
handle and refuses only a name surrogate (symlink, junction, WSL link), so a
cloud-files placeholder — every OneDrive-synced folder — is still the directory
it is; the default stays refuse-all for the gateway's own directories. The
directive and the slot project endpoint run `screen_and_resolve_project_dir`
on a worker thread and hold no realpath of their own; the endpoint's person
arm runs main's realpath off the loop too. A non-person request is refused for
any screen cause. The chain opens with `pinned_fs.traverse_flags` — `O_PATH`
where the platform has it — so it needs only the search permission a by-name
realpath needs and a directory under a search-only ancestor still pins (a link
or a file at a component is still ENOTDIR); a component this process may not
traverse answers its own text (no "retry"), and a spelling no filesystem can
carry (an embedded NUL) answers the missing-directory refusal on both arms
instead of escaping as a server error. The sensitive-path refusal keeps
main's precedence over the missing-directory one: judged on the real path when
the open finds one, on the link-free spelling when it does not. The
link-screen gate's baseline names the renamed hooks site.
The walk resolves in component order, the kernel's own. Nothing folds a `..`
lexically before it on POSIX: `_anchored_spelling` only anchors a relative
path there, `link_screen` renders the spelling through pathlib each hop (`.`
and doubled separators dropped, every `..` kept), takes the components below
a link as the path names them rather than through relpath, and the POSIX
target normalizer no longer normpaths — so `work/link/../sibling` with
`link -> projects/team/subdir` reaches `projects/team/sibling`, as realpath
does, and the pinned open then opens `..` relative to the directory it
holds. On Windows the Win32 parser folds `..` before any filesystem sees a
name, so abspath there is the platform's rule and runs first. The
`escaping_suffix` cause is gone: a component-order walk has nothing to
escape. A request whose link the screen cannot read or place is refused
apart from the share-shaped cause (`PROJECT_DIR_UNSCREENABLE_LINK_REFUSAL`;
at the slot project endpoint the code `project_dir_link_unscreenable`,
audited `unscreenable link`, while a share-shaped link target keeps the UNC
code and is audited `UNC link target`).
The filing fence judges the COMMITTED folder tree: `mutate_folders` applies
a change to the live list and restores it only if the off-loop write fails,
so the fence reads a snapshot through `read_folders` (the store lock
excludes a mutate in flight) and revalidates the slot after that await —
a binding clear about to roll back is never judged as unbound.
The Windows placeholder arm has a fixture on the Windows CI shard: a real
junction is refused through `real_dir_path_pinned` at the leaf and as an
ancestor, and the same reparse point is accepted as the directory it is —
resolving to its own path, never its target — once the tag read
(`platform_compat._win_reparse_tag`, split from the classifier
`_reparse_tag_redirects` so a test can hand it a real tag value) answers
`IO_REPARSE_TAG_CLOUD`; the classifier is pinned on every host with the
documented tags. A live Files On-Demand folder was not available; the PR
body names the one-line command a maintainer with OneDrive runs.
The packaging builder's settled-rejection test watched for pinned_fs
growing a Windows no-reparse path and fired. It is re-argued, not silenced:
pinned_fs now pins ONE directory on Windows but offers no handle-relative
walk (scandir, stat and open take no dir_fd there), which is what the
builder's enumeration needs, so its narrowing stands and the test pins the
confinement — a single `pin_directory` call site, inside
`real_dir_path_pinned`.
Dropped from this change: the agent bind path (#10432 stays open; filed as
it — a family of caller-class arms, then one containment rule on the agent's
own project directory — drew a finding on every head, the last that a bound
directory inside the agent's own tree can be swapped for a link after the
check and retarget the person's next chat; the owner-scoped read side that
existed for agent-written bindings goes with it. It ships as nothing rather
than as a rule with a known hole; the fence work it needed is what ships.
The scaffold routes are the person's verb: every folder a scaffold creates is
bound, so `POST /api/project-scaffold/scan` and `/create` refuse every other
principal -- an enabled app posting with its own credential, the internal
transport -- with the binding refusal's own 403 before the body is parsed
(`_refuse_non_person`, the same one bit), so an agent-named root is never
resolved on the way to a refusal; the create-rate limiter the create route
carried for internal callers goes with the caller it guarded. The link half and
the pinned resolve live in one function, `screen_and_resolve_project_dir`, whose
cause-to-refusal mappings the fenced folder admission shares. The person stamp's
writer is pinned: the four sites in token_auth that write `is_dashboard_user`,
a validated user credential stamping True, an app-claim credential False, and
an invalid one nothing.
The sensitive-path verdict after the pinned resolve is taken on the pinned real
path -- and, for a path the open does not find, on the link-free spelling -- as
it stands (`project_dir_sensitive_refusal` over `is_sensitive_resolved_path`,
on the worker thread, fail closed on a resolver stall), never by resolving the
name again: the by-name check walks its argument before matching, and after the
pin that walk would follow a component swapped for a link -- on a Windows
gateway, a junction to a share. The directive's two by-name checks and the slot
project endpoint's loop-side re-check are gone; the endpoint's person arm takes
the verdict from the same worker call as its realpath.
Filing is the one way a session acquires a folder's binding and steering, so
every request-driven filing takes ONE decision, `refuse_filing_across_inheritance`
(`filing_crosses_inheritance` underneath): the PATCH folder route, the
slot-create route -- where an app's own credential could until now create a
session under a person-bound folder and inherit its project_dir and steering --
and the agent tools `session_create` and `session_fork`, from the creator's or
the source's own placement. The person is never confined; any other principal
may not place a session where it would inherit a binding or steering it does not
have today. A structural test enumerates every function in the dashboard package
that writes a session's folder or project and holds each request-driven writer
to that decision, naming why every other writer (a restore, a fork's copy,
channel and cron placements from configuration, a session's own project) is not
a filing.
The filing decision and the WRITE share one section under the folder store lock
(`file_slot_across_inheritance` over `state.hold_folders`) at the PATCH folder
route -- its identity re-check runs inside the same section -- and at the
slot-create route, where a refusal at the write retracts the slot the request
minted; the agent tools re-run the comparison adjacent to the child's
assignment, inside the synchronous configuration window their own pin forbids
awaits in, refusing while a folder write is in flight rather than judging a
provisional tree, and retracting the child on refusal. The fenced pipeline
exists once, in `screen_and_resolve_project_dir`: no non-person `project_dir`
reaches the folder routes or the scaffold, so their admission is the person's
validator and the duplicate is gone.
WHO is the person is two positive facts, not one: the middleware's
`is_dashboard_user` stamp proves that a non-app dashboard token validated on the
request -- the credential's class -- and the repo's owner predicate
(`is_owner_dashboard_request`: the token's subject is the configured owner, or on
an install with no owner the machine-local bootstrap identity) says who holds
it. An allow-listed Slack user who asks the bot for a dashboard link holds an
app-less token stamped exactly like the owner's; on the stamp alone that user
passed every fence here and their binding became the owner's chats' working
directory and steering root. `_is_the_person` asks both, in the one place every
fence reads.
At the slot-create route the App Kit ownership gate runs FIRST, on the slot the
request's name already addresses and before anything reads it: the filing
decision compares that slot's placement with the destination, and run ahead of
the gate its 403 against the ownership 404 told an app token where a slot it
does not own is filed. One helper (`_foreign_slot_create_denial`) answers at
both sites -- the late gate below the mint stays as the race guard -- with the
one `slot_not_found` 404, byte-identical whether the foreign slot is bare or
bound.
The owner predicate is the repo's one definition of the owner, and it denies
the operator's own session from before `KIROCREW_OWNER_ID` was configured (a
token's subject is fixed at mint and kept by every refresh, so it carries a
bootstrap subject for life). That caller is not admitted; every refusal
`_is_the_person` decides runs through one tail, `_person_gate_refusal`, which
answers it with the repo's `401 stale_session_reauth` (the same
`stale_owner_session_response` every owner gate consults) instead of the
agent's 403, so signing in again is signalled where it is the remedy; an app's
token, the internal transport and an allow-listed user keep the gate's 403.
A refusal is audited against ATTESTED identity only (`_agent_audit_caller`):
the caller's principal, else the token subject the middleware validated, else
the declared `X-Session-Key` when the AF_UNIX peer check kernel-attested it,
else `unattributable`. The bare header is caller-chosen on TCP loopback, so a
refused caller could write any string -- the owner's own subject -- into the
fences' SEL rows; a row that names nobody is the honest one for an unattested
caller.
The fenced resolve releases its no-follow pin when the value is stored -- the
real path it returns is a name again -- and the spawn that enters it is
deferred to the next turn, so a same-UID process the agent started could
replace the directory at that name in between (on a Windows gateway a junction
to a share, which `CreateProcess` would follow into the SMB connection the pin
existed to prevent). Every BINDING therefore records what the spawn re-verifies,
on the SESSION: `slot.project_identity`, the `(st_dev, st_ino)` of the directory
bound -- the agent arms from the held descriptor
(`screen_and_resolve_project_dir(..., identity_out=)`; `real_dir_path_pinned`
gains `held_out` for it), the person's own choice, a folder's inherited binding
at creation and a fork's copy from what the name resolves to
(`sandbox.directory_identity_by_name`); the configured default records nothing.
The record is held in memory beside `project`, applied only while its spelling
is the slot's current project, and rides to the spawn with `cwd`
(`sessions.get_or_create(cwd_identity=)` -> the provider factory ->
`AcpProvider(work_dir_identity=)` -> `AcpClient` / `AcpRuntime`). The spawn
(`sandbox.verify_agent_workspace_for_spawn`) checks by IDENTITY, not by refusing
links -- the threat is a swap of the bound directory, so a benign link an
ancestor has always crossed is not a swap, and a binding with no identity is
not examined and spawns exactly as before. A recorded binding has its leaf
re-read without following a link at it (POSIX `O_NOFOLLOW` open + `fstat`;
Windows `os.lstat`, a name-redirecting reparse point refused, then `os.stat`)
and compared: a leaf that is now a link, missing, or a different directory
refuses the spawn as a governed refusal -- the site's own error naming the
remedy, re-bind the directory, so a recreated directory recovers by re-binding
and a second session on the same path carries its own record; equal, the spawn
enters the verified directory's real path, and on POSIX the verified
descriptor is closed on a worker thread scheduled after the PID bookkeeping --
no await and no loop-side close between a live child and its record. On macOS
the bound descriptor the child enters is verified by identity against the
check; other spawns keep the pathname `cwd` (no descriptor binds off macOS, a
recorded rule), so the residual there is a same-UID rename of the directory
itself in the window `AcpRuntime._session_work_dir` already records -- never a
link swap, never a share. A refused re-bind at the slot project endpoint rolls
the identity back with the project; a refused folder filing at creation
retracts the minted slot with its restricted-key marker.
At `POST /api/chat/slots` the filing runs before any other write the route
makes to the slot: a write-side refusal used to return after the title pin and
the artifact binding had landed, leaving both live on an existing slot the
request was refused to file; a refusal now returns the slot exactly as found.
The scaffolder manifest's `permissions.api` grant for `/api/project-scaffold`
is deleted: only app tokens consumed it and the route refuses every app token.
`_admit_project_dir`, a second name for `_validate_project_dir`, is deleted;
its callers call the validator directly.
The identity a by-name binding records is read off the descriptor that opened
the resolved directory without following a link at it
(`sandbox.directory_identity_pinned`, on the validating worker thread), never a
by-name stat after validation; every identity is read off a handle
(`platform_compat.handle_identity`: POSIX `fstat`, Windows
`GetFileInformationByHandle`), an unknown identity (a zero inode: SMB shares,
FAT) is never recorded and is reported, not refused, at spawn -- the contract
`project_scan.root_identity` pins for the same comparison. Every release of the
verified descriptor goes to a worker thread, the cancellation path included;
the verified spelling is the spawn `cwd` unless the macOS bind binds or names
another path. `hooks._components_below` splits on the platform's own
separators only: a trailing backslash is a name character on POSIX.
One identity function serves every recorder and the check
(`platform_compat.handle_identity`, composed as `os.stat` composes the pair):
the fenced resolve reads it off the held chain inside
`real_dir_path_pinned(identity_out=)` before the chain closes, the spawn's
Windows branch opens the leaf as itself and reads it off that handle, and the
agent-switch route records the folder project's identity the way the create
route does, rolled back with the project's commit token. A trailing backslash
is read through `getattr(os, "altsep", None)`. The remaining verify-to-spawn
window is held for a maintainer ruling (a sandbox-scope change).
A different REAL directory at the bound name (a re-clone, a remount) is logged
and spawned as bound -- a persisted record must not become a permanent refusal;
the swap that reaches a host is a link, and a link at the leaf still refuses.
With a `folder_id`, the slot-create mint's survey count waits for the filing
decision. The tests carry no platform skip: the Windows arm runs everywhere
through `platform_compat` seams (`_win_open_without_following`,
`_win_file_attributes`, `_win_reparse_tag`), the bound-descriptor comparison
through `sandbox._directory_identity_from_fd`, and a real directory link comes
from `platform_compat.symlink_or_junction`.
The macOS voice-runtime pre-flight the fenced sites run after the verdict
compares the pinned real path as it stands (`pre_resolved=True`), never
re-walking it by name. The scaffold routes' non-person refusal is their own:
the audit and the answer name the verb refused (`scan` or `scaffold`), 403
`scaffold_person_only`, on the person-gate tail. The spawn-shape tests assert
what the child enters -- the bound descriptor on a binding host, the verified
directory's real spelling elsewhere -- and run a forced-darwin arm on POSIX.
On Windows the spawn-time check walks the bound spelling ROOT-FIRST through the
pinned resolve's own chain walk (`pinned_fs.hold_windows_directory_chain`):
every component opened as itself and its reparse tag judged before the next is
opened, so a junction at any component is refused without being resolved; the
identity is read off the final handle and the chain is closed before the spawn.
A binding always records or is refused: a directory the bind cannot pin is a
failed bind surfaced to the caller (`sandbox.WorkspacePinFailed`), a volume that
reports no inode records the unavailable state (`IDENTITY_UNAVAILABLE`), and at
spawn a different directory at the bound name refuses with the governed error
naming the remedy. The spawn-time Windows check enters `real_dir_path_pinned`,
the module's one handle-pinned path, for its identity.
The identity lives for the gateway process's lifetime: recorded in memory at
bind, re-pinned from the bound path at the first spawn of a project that carries
no record in this process (every slot after a restart), and never persisted --
`st_dev` is reassigned across mounts and the transcript store is agent-writable,
so a stored pair would refuse unchanged directories after a reboot and accept a
forged one. A `project_identity` line in the transcript is never read back.
A bound directory the restart re-pin cannot open refuses the spawn as the
governed error (`WorkspacePinFailed`, the turn's `AcpError`), never an
unexamined `None`, which only a slot with no binding carries.
Bind, restart re-pin and spawn verification share one identity function per
platform (`sandbox.open_pinned_directory`: the Windows root-first no-reparse
walk; the POSIX `O_NOFOLLOW | O_DIRECTORY` leaf open + `fstat`), so a junction
at any component is refused by every path and none opens by name for an identity.
Round 44 (on the maintainer's rebase onto b5ca357ba8, which composed the fence
with #11680's folder-project inheritance): a session_create child filed into a
project folder carries the identity the fenced pin read off the folder's
directory before the slot existed when the caller's own record does not cover
that spelling -- the caller holds the binding by placement, so the record is
derived from the directory the binding names -- and a folder directory the pin
refuses fails the create with folder_project_invalid: the recordless-child case
in the folder-inheritance arm, found by the round's probe. test/
test_project_directory_seams.py pins every seam that hands a session a
directory: every writer of a session's project records a derived identity or is
listed as a configured or restored spelling re-pinned at first spawn (12 writers,
6 + 6), every provider-factory call passing cwd is the allocation body, a
resolver, or listed as spawning where no slot binds (4 doors), and every
cwd_identity producer takes the slot's record and never pins fresh (4 producers).
Round 46: the spawn-time verification keeps its hold across the process
creation on Windows too. The Windows arm of sandbox.open_pinned_directory hands
the pinned handle chain back OPEN (pinned_fs.real_dir_path_pinned(held_out=),
root-first, every component held without FILE_SHARE_DELETE) instead of closing
it before returning, and both ACP spawn sites release it -- through
release_agent_workspace_fd, which closes a descriptor or a chain, leaf-first --
on the worker thread they already schedule after the PID bookkeeping and on
every failure path. Before this the chain was closed before the check returned,
so CreateProcess entered a bare name a same-UID process could re-point at a
junction to a share in between, the outbound SMB authentication the check exists
to prevent; the docstring's "never a share" held only at check time
(review-caught, security-class). Nothing new is refused, pinned or masked, and
the POSIX arm is unchanged: its descriptor already spanned the spawn. This
restores the retention round 26 carried and round 30 removed under a hold
routed to the maintainers; that hold now covers only the POSIX chdir_fd half.
Round 47: two Windows-shard reds in the round-46 tests, both test-shape. The
pool-class stand-in provider (test_chat_slot_project.py) called the spawn-time
verification and dropped the hold it hands back; on Windows that is the held
chain, so the test's own swap could not remove the directory (WinError 32) --
the stand-in now releases the hold right after the check, as the real sites do
once the child exists. The held-out hand-over test (test_platform_compat.py)
counted descriptors with before + len(held); _open_descriptor_count answers a
true count only where /proc exists and on Windows is the lowest free CRT
descriptor, so a table with holes above it breaks the arithmetic -- the test
asserts the property instead: every handed-over descriptor open, one per
component the walk holds (the leaf on the POSIX pinned walk, every component on
the Windows handle arm), every one closed after close_all, nothing on a refusal.
No production code changes. Rebased onto a main that moved the shared ACP
transport code into owner modules and reverted the launcher-mask binding: the
one conflict, the client's sandbox import block, resolved by taking main's
deletions and keeping the identity-check names this change uses.
Round 48: the deferred session reset fires on an identity change as well as a
spelling change, at both binding sites -- the slot-project endpoint and the
set_project directive. Each recorded the new (st_dev, st_ino) unconditionally
but armed the reset on path text alone, so re-binding a directory replaced at
its name recorded the replacement and left a live provider serving turns in the
old directory, the identity being compared only at spawn (review-caught: the
fence is identity, and a reset keyed on spelling contradicted it on exactly the
case the identity check exists for). A re-pin that reads the same identity back
stays quiet; a first record is not a change. No new refusal, no seal, no
widening. The facade-patch census ratchet lists this change's two
module-parameter test helpers (the ACP client spawn harness and its bind spy),
the shape the ratchet's listed dict exists for. Rebased over the folder-create
dry run and duplicate-name refusal; the chat_folder_create description keeps
main's ownership sentences with this change's binding sentence after them.
Round 49: the two Windows-retention spawn tests answer the internal-sandbox
bind as a Windows host does -- the spelling back, nothing bound -- and run
under the host's platform and under darwin forced. On a darwin host the real
bind bound a descriptor and the bound-descriptor compare met the test's fake
handle chain, a combination no host produces (a Windows host never binds; a
darwin host never holds a chain); the compare's chain arm is unreachable in
production and is unchanged. Test shape only.
Round 50: two spawn-side doors the identity fence did not yet cover. The
provider's resume path builds its replacement runtime with the session's
recorded identity, exactly as the first spawn's construction does: when the
first runtime dies during session/load the path respawns, and that replacement
was built without work_dir_identity, so its spawn verified nothing and a bound
session could respawn into a directory swapped at its name while the first
runtime was dying (review-caught, security-class). One argument, the same seam
and value as the first spawn; no new refusal, no widening. The seams pin gains
the door its sweeps did not see: every runtime or client construction passing
work_dir also passes work_dir_identity per call, or is listed as spawning where
no slot binds (the review pool's own tree). And session_revive -- brought to
main while this change was under review -- files a revived archived session into
a caller-named folder; it now takes the one filing decision every other
request-driven filing takes, from the placement the session was archived in
(none reads as the top level) to the named folder, before the revive commits, so
a refused filing revives nothing, files nothing and unhides no folder; the
structural writer test is what caught the door.
Round 51: rebased onto main aec81410e2 to pick up #14925's test-side fix for #15361
(the revive tests' shared archive helper now backdates closed_at, so the two filing
tests this change added no longer meet the Windows clock-tick resume conflict
before their assertions run); no code change.
Round 52: the revive's filing decision is taken again at the write. The early
gate judged a snapshot before the resume, and the resume awaits, so a folder
mutation could commit in between -- the target folder acquiring a binding or
steering -- and the write, which compared only the slot's own placement, landed
on a tree the decision never saw (review-caught, security-class). The decision
and the assignment now share one section under the folder-store lock, the
shape the folder PATCH and the two child-filing tools already take adjacent to
their writes; a crossing there refuses the filing alone, in the fork's
in-window shape, with the revive committed: the session comes back where it
was archived, nothing filed, no folder unhidden, no filing noted. The early
gate stays as the fail-fast before the resume. Same writer, same chokepoint.
Round 53: the write-time decision declines instead of raising. A revive that
has happened is never turned into an error: the early gate keeps refusing
before anything is revived (a refusal is truthful only while nothing has
happened yet), and a decision gone stale at the write leaves the revive
standing and answers success with filed: false and the move rule's code in
filing_refused -- the posture every post-revive filing outcome takes; the fork
raises because it retracts its child, and nothing is retracted here. Same
section, same lock, same decision; one branch changed shape.
Round 58: the verified descriptor is the child's chdir_fd on POSIX. The spawn
check held the O_DIRECTORY descriptor of the verified directory across the
process creation but still entered the directory by its pathname -- Popen's
chdir in the fork child re-resolved the spelling -- so a same-UID rename of the
bound directory with a link planted at its name between the identity read and
the fork sent the agent into the link's target (review-caught, security-class;
the POSIX half of the round-30 item, held for a maintainer ruling since then and
ruled now). Both spawn sites hand the hold to create_subprocess_limited as
chdir_fd wherever nothing else bound one: the pathname leaves the spawn and the
shim fchdirs the inherited descriptor, as macOS internal-sandbox spawns always
did, and PATH is screened by the pinned identity the same way. A directory
bound with no identity still spawns by name; on Windows the held chain stays the
control. The specs drop the "never a link swap" residual the pathname entry had
left open.
Round 60: the restart re-pin keeps the first record, and the workspace default
is not a binding. Two first spawns of one restored slot could re-pin at the same
time -- the main chat and its side panel -- and both passed the no-record check
before either pin returned; the second then overwrote the identity the first
had recorded, so a directory an agent replaced between the two pins became the
identity every later spawn verified against (review-caught, security-class).
After the awaited pin the slot's record is read again and an established one is
returned instead of overwritten: the first writer wins and the second spawn
refuses the replacement. And a chat that chose no project stands on the
workspace default, which is the warm pool's own spawn directory; the re-pin
pinned that spelling like a binding, so every ordinary chat carried an identity,
took the bypass arm and cold-started -- the pool was never claimed
(review-caught). The workspace default now answers None at the re-pin: nothing
recorded, nothing examined, the warm path kept, as the specs state.
Round 61: the revive's post-filing decision judges the LIVE placement. The slot
is published before its filing takes the slot-metadata lock, and the lock
acquisition is an await; the decision compared the archived placement, so a
filing the person committed in that wait -- the revived slot refiled into a
steered folder -- was judged as "top level -> target", found no crossing, and
was overwritten without a refusal (review-caught, security-class). The decision
now reads `slot.folder_id` under the lock, the placement the write would
overwrite: leaving the steered folder crosses the inheritance, the filing is
refused with the move rule's code, and the person's placement stands.
Round 62: the spawn resolver consults a slot on the workspace default for that
slot's own spawns only. The default is configuration, not a binding -- a chat
that chose no project stands on it with no record, and the warm pool spawns
there -- but a record one chat put on it (it named the default explicitly
through the project endpoint) was matched for every spawn into the spelling, so
every default chat verified a stranger's identity, took the pool bypass and
cold-started (review-caught). The resolver now skips a slot standing on its
workspace's default unless the spawn is that slot's own -- the main chat, its
side panel, its threads -- so the explicit binding still fences its chat and
every other default chat keeps the warm path.
Round 63: both spawn sites acquire the verified hold FIRST. The check ran after
main's readiness mkdir and the rest of the preparation (the skill projection,
the governance reads, the sandbox wrapper), every one of them a pathname probe;
on Windows a bound directory swapped for a link to a UNC share was followed by
the mkdir's is_dir fallback into an SMB handshake with the attacker's host
before the check refused the spawn (review-caught). `_spawn_admitted` and
`_spawn` now verify and hold before anything touches the name, run the whole
preparation and the spawn inside one try under the hold, and release it exactly
once on every exit through `_release_spawn_hold` -- the success path after the
PID bookkeeping, the spawn failure handler, and the outer handler for a
preparation that raised. The readiness mkdirs (`_spawn_admitted`,
`_prepare_spawn_workspace`, `ensure_ready`) create the unbound default only: a
bound directory exists by construction and its name is not probed before the
hold. The body of each spawn method is indented one level by that try; the
source-shape tests that slice it by indented anchors (two deepseek and one pi
anchor) follow the new depth. A first cut of this round moved the body into a
helper method instead and was pushed, then withdrawn: twenty source-shape pins
across twelve test files read the spawn path off `_spawn` / `_spawn_admitted`
and stopped finding it; the local gate had run only the spawn files, not those
pins.
Round 64: the pinned open is the ONLY walk on the agent's project path. The
fenced admission screened links by name first (`link_screen` over the
ancestors, root-first, one `lstat` each, re-spelling benign links through) and
pinned afterwards; between two of those reads an ancestor swapped for a link --
on Windows, to a share -- was followed before the pin could refuse it
(review-caught: the same probe-before-pin class as Round 63, at the bind seam).
The screen is gone: an agent-named path is anchored, matched lexically for the
sensitive locations, and opened component by component with no link followed;
a link or a non-directory at any component is refused at the open with
`PROJECT_DIR_LINK_REFUSAL` (code `project_dir_link`, audited `link on the way`,
apart from the UNC text class) -- an agent path through a link is refused, not
re-spelled, the rule applied consistently; the person's bind resolves by name
as on main. `hooks.py` returns to main's (the screen refactor had no other
caller). The specs that restated the mechanism three times now state it once
(`security.md`) and point to it.
Round 65: the `..` test (`test_dotdot_is_opened_relative_to_the_directory_the_pin_holds`)
asserted the link refusal on every host; on Windows `_anchored_spelling` applies
`abspath` by design (the Win32 parser folds `..` before any filesystem sees a
name), so `work\link\..\sibling` legitimately resolves to `work\sibling` -- the
test now expects the folded directory there and the refusal on POSIX. The eight
largest `chat_folders.py` docstrings are condensed with every rule kept. Rebased
onto main `c6bfd72dba`: main's `slot_ownership` gates (PR #16212) now run the
slot-create ownership check ahead of the filing decision's placement read, the
same oracle this fence closed in Round 5x with `_foreign_slot_create_denial`, so
that helper is gone and both create-route gates are main's; the survey count
waits for the filing decision AND skips a cron's slot (both conditions); the
spawn-site bodies carry main's launch-agent and agent-engine auth edits under the hold.
Round 66: prose only, to bring the diff under the Design lane's 1,000,000-byte
cap (1,041,806 -> 944,598 bytes). Every multi-line test docstring this change
added is cut to its first sentence (24 test files, 86 KB; every assertion and
fixture byte unchanged -- the files' ASTs are identical with docstrings
blanked), and the two spec blocks that restated the fence's mechanism
(`docs/architecture/mcp.md`, `docs/system-specs/modules/session-control.md`)
state each rule once and point at `security.md` for the mechanism. Round 64's
condensation had dropped main's own paragraph on `session_create`'s filing
window (`suspend_slots_push`, the dry-run existence check); it is restored
verbatim. No source docstring or comment changed.
Round 67: the restore seam joins the fence. A resume whose producer named no
directory takes the one the session map stored, and the allocator probed that
name (`Path(stored_cwd).is_dir()`) and let the runtime preparation resolve it
before the identity seam ran -- on Windows a bound directory swapped for a link
to a share was followed into an SMB handshake before the spawn's hold could
refuse it (review-caught: the third seam of one class, after the spawn sites
and the bind). The allocator now resolves the identity FIRST -- for the stored
directory and for a producer's `cwd` alike -- and only then lets `is_dir` and
`prepare_runtime` see the name; a pinned directory is not probed again, an
unbound stored directory keeps main's existence check, and a member's project
the preparation hands back is resolved the same way when nothing was resolved
for it yet. Red-first: a link planted at the stored bound name is refused with
the resolver consulted before any probe (`['is_dir', 'resolve']` red,
`['resolve']` green). A structural pin
(`test_project_directory_seams.py::TestNoProbeOfABoundDirectorysNamePrecedesItsPin`)
now reads the source of every entry point where a bound directory's name can
reach the OS -- the two spawn sites, the agent bind seam, the allocator -- and
refuses any by-name probe (`is_dir`/`exists`/`resolve`/`realpath`/`stat`/
`mkdir`/`open`, called or handed to a thread) ahead of the hold or identity
call, so a fourth seam fails the test instead of a lane; it names both earlier
shapes when run against them.
Round 68: a volume mount point is the one surrogate the Windows walk follows.
`IO_REPARSE_TAG_MOUNT_POINT` is carried by a junction AND by a volume mount
point (a Dev Drive, a second disk mounted at a folder); the walk refused both,
so a project behind a mounted volume could not be bound or spawned
(review-caught). The two differ in their reparse data: a junction names a PATH
that any writer of the parent can retarget, a volume mount point names a DEVICE
(`\??\Volume{GUID}\`) that cannot point at a share or another directory and
that only an administrator retargets. `pin_directory`, for the opted-in caller
only, reads the data by name, follows the point exactly once when it names a
volume GUID, and keeps the descriptor only if the object held is a directory,
not itself a reparse point, and the ROOT of that same volume by its handle's
GUID path -- a mount point swapped for a junction between the read and the open
lands where the second check refuses. The identity pinned through a mount point
is the mounted volume's. A junction with a path as its data, a symlink, and a
point whose data cannot be read stay refused (`test_platform_compat.py::
TestAVolumeMountPointIsTheOneSurrogateTheWalkFollows`; the spec names the
carve-out). Also: the NUL-spelling test built its path under `/tmp`, a symlink
to `/private/tmp` on macOS, so the agent arm rightly refused the link before
judging the leaf; the spelling now hangs off a link-free root. And the slot's
own spawn is matched through the key the runner really spawns under
(`effective_session_key`: `dashboard:<slot>`, or a channel-born slot's linked
key), never the bare slot key (review-caught): the Round 62 predicate compared
the bare key, so a slot bound explicitly to the workspace default read its own
main session as a stranger and its hard-stop respawn spawned unverified; the
pool test now drives the own spawn under the real key shapes.
Round 69: the allocation holds what it touches. Between the identity resolve and
the spawn's own hold, `_get_or_create_impl` touched a bound directory's NAME
itself -- the runtime preparation resolved it, the provider's construction read
and wrote the effort overlay under it, the saved-capability recheck resolved it
again -- with nothing held, and a producer that passed `cwd_identity` in skipped
even the resolve (review-caught: on Windows a bound directory swapped for a
directory symlink to a share was followed into SMB by `Path.exists` before the
spawn could refuse it). Each of those steps now runs through
`_under_verified_hold`: the spawn sites' own primitive
(`sandbox.verify_agent_workspace_for_spawn`) verifies the directory against the
identity and holds it for the step, released in the same thread on every exit; a
swapped directory is refused with the re-bind remedy before the preparation or
the factory see the name, a directory with no identity runs as it always has.
A member project that replaces the directory is resolved afresh (an identity for
the old spelling says nothing about the new one). Red-first in
`test_chat_slot_project.py` (the order `verify, prepare_runtime, factory`; the
swap refused before either; the unbound directory untouched), and the source pin
(`test_project_directory_seams.py`) now refuses any of those steps called bare
in the allocator -- run against Round 68's allocator it names all four. Also:
the mount-point test's Windows arm faked the opener with `os.open`, which cannot
open a directory on Windows; a real junction now stands in for the point there,
with the real opener, attributes and tag, and only the reparse data, the
following open and the GUID read faked.
Round 70: the factory's hold is taken off the loop. The provider construction
is synchronous and stays on the loop as it always was, but Round 69 ran the
hold's pin opens and its release inline around it (review-caught, both lanes:
a slow volume would stall every chat and the heartbeat); the hold now comes
from the spawn sites' cancellation-safe off-loop wrapper
(`_verified_hold_async`) and is released on a worker in a `finally`
(`_release_allocation_hold`); the order test asserts the verify and the release
never run on the loop thread, and the source pin refuses a direct
`_under_verified_hold` call in the allocator.
Round 71: the task run's bootstrap door constructs under the hold too. The
shared-runtime bootstrap (`_get_or_bootstrap_run_runtime`), the one factory
call outside `get_or_create` that spawns into a caller-named directory,
resolved the identity but constructed the provider bare (review-caught: the
same `Path.exists` on a bound directory swapped for a link to a share); its
construction now runs under the same off-loop hold and release as the
allocation body's, the order test covers the door (verify before the factory,
a swap refused before it), and the source pin lists both doors. Also: the
hold tests drained the default executor with one no-op task, which on a
multi-worker executor can run ahead of the scheduled release and leave the
closes landing in the next iteration (macOS); they now wait for the release
itself. Prose: the largest docstrings this change adds are condensed, every
rule kept.
Round 72: two test shapes the deterministic-tests rule forbids, review-caught.
The clear-vs-filing race test waited 0.2 s for the filing to reach the folder
hold; it now waits on a signal the hold's own section sets. Two tests undid a
temporary `open_pinned_directory` override with a bare `monkeypatch.undo()`,
which also undid the autouse fixtures' patches on the shared module; each
override now lives in its own `MonkeyPatch.context()`. The Backwards
compatibility note names the #11680 narrowing (an orchestrator outside a
project folder can no longer dispatch a worker into one). Prose: this change's
own newest docstrings condensed.
Round 73: the spawn's hold claim narrowed to what it pins. On POSIX the held
`O_DIRECTORY` descriptor pins the child's working directory (`chdir_fd`), not
the spelling: the fork-governance, sealed-target, voice-runtime-guard,
derived-spec and skill-projection preparation reads still open the directory
by name between the verify and the spawn (a residual that pre-exists on main
and is tracked for descriptor-relative reads in the deferred-finding issue the
seams pin names); on Windows the held chain pins the spelling too. The seams
pin now lists every call the name reaches after the verify at both ACP spawn
sites, each with its reason, and fails an unlisted one; the specs, the spawn
sites' comments and this change's own largest docstrings say the narrowed
claim. The packaging identity pin's confinement of `pinned_fs` to two
handle-pin functions is declared in the description.
Round 75: rebased over the folder tools' new update verb (rename, icon,
colour). The pin that said no update verb exists now says what the verb may
carry -- those three fields and nothing that binds or steers -- and the
duplicate-name refusal main added to the folder PATCH sits beside the two
inheritance refusals under the same lock.
Round 77: rebased over the launch-tail refactor (#17214), which moved both
drivers' process creation into one shared tail (`acp/launch.py`). The two spawn
methods still verify and hold the directory before any preparation read; each
now hands the tail the hold and the verified spelling in its launch request,
and the tail assigns that spelling as the cwd after it discards the previous
bind, lets the macOS voice bind replace it only when it binds, cross-checks the
bind's descriptor against the hold, and enters the child through the bind's
descriptor or, on POSIX, the hold itself; the spawn method keeps the hold and
releases it after its PID bookkeeping. The seams pin derives both ends from the
code: the one function in `acp/` that creates the process must be that tail,
every ACP method that calls it must be a listed hold-first entry point, and the
request must carry the verify's own hold and spelling; a harness adapter's own
preparation (`resolve_spawn`) joins the by-name reads the pin lists under the
tracked residual. The agent-switch writer follows main's split into
`switch_slot_agent`; the create route's title and artifact writes carry main's
cron-title rule after the filing; the readiness mkdir uses main's
`ensure_directory` and stays gated on the binding carrying no identity; main's
own paragraph on `session_create`'s filing window is kept as main now words it.
Round 78: the autouse fixture of the Continue-with-project test
(`_no_side_effects`) patches through the isolation floor's own `MonkeyPatch`
(`_floor_monkeypatch`, testing-conventions D11) instead of the shared
`monkeypatch`, so a test's `monkeypatch.undo()` cannot lift its pins; the repo's
semgrep rule for that shape reported it on the previous head. No other change.
Round 79: the bootstrap-door hold test told the bootstrap's release from the
stand-in spawn's by ORDER (the first release after the factory), but the hold
schedules its release on the executor as the block exits and the stand-in's
`start()` releases on the loop right after, so which reaches the spy first is
thread scheduling: on the slower macOS runner the stand-in won and the test
charged its on-loop release to the bootstrap. The spy now tells the two apart by
caller (the stand-in's own frame is skipped), keeps the count-based wait, and
still fails when the hold really releases on the loop (proven by inlining the
release). Reproduced on Linux by delaying executor callables 50 ms; no
production change.
Round 81: the Windows-chain hold test spied every `os.close` in the process and
counted a descriptor numbered like one of its three fake handles (101-103) as the
chain. On a long-lived test worker an EARLIER test's off-loop release of a real
descriptor with one of those numbers landed during this test and read as "the
chain was released before the spawn"; the chain itself was never released
early (the driver releases exactly once, after the PID bookkeeping, proven by a
release trace). The fakes are now numbered far above any real descriptor, so a
straggler close passes through unrecorded; the test still fails when the hold
really is released before the create (proven by an early-release probe).
Reproduced on Linux by padding the descriptor table to ~100 and delaying
executor callables 50 ms; no production change.
Round 82: the slot-project route's UNC test (`test_a_unc_project_is_refused_before_realpath`)
installed its process-wide `realpath`/`isdir` spies before building the slot, and a slot's
construction mints its tags revision through `config_dir()`, whose first resolve of the data
home fired the spy when the per-process memo was cold; the slot and the app are now built
before the spies go in. Test only; the route is unchanged and the test still fails when the
route itself touches the name.
Round 86: rebased over #17280 and #14539, whose projected launch record reads the
bound directory's name twice inside the held preparation block
(`inherits_default_resources`, `projected_launch_paths`); the seams pin lists both
as #17395 residuals, as it lists the other preparation reads. Test only.
Round 87: the Windows handle chain now denies write sharing as well (`FILE_SHARE_READ`
only, the volume-follow handle included) for the brief hold between the verify and the
process creation. With `FILE_SHARE_WRITE` left on, a same-user writer could set a reparse
point on a held EMPTY leaf in place (`FSCTL_SET_REPARSE_POINT` needs a write handle; a
rename or delete was already refused) and a child entering by name on Windows would have
followed it. The cost is the posture the pin already takes for delete sharing: a spawn
fails closed only when another process holds the directory open for writing at that
instant. This narrows, not answers, the live-Windows question, which stays the owner's.
Round 88: the write-sharing denial of Round 87 narrows to the LEAF. Only an empty
directory can be turned into a reparse point in place and only the bound leaf can be
empty (every ancestor contains the next component), so the leaf alone is held without
`FILE_SHARE_WRITE` (the volume-follow handle included when the leaf is a mount point);
the ancestors keep the delete-share-deny posture they had, so a stray write handle on
the drive root or a profile directory does not fail the spawn. Same security effect,
smaller fail-closed surface.
Round 89: the whole-chain write-sharing denial of Round 87 returns. Round 88's leaf-only
narrowing re-opened the acquisition race on ancestors a writer can empty: an ancestor
"always contains the next component" only once that child is pinned, so between pinning a
write-shared ancestor and the by-name open of its child a same-account writer could
delete the unpinned child, convert the emptied ancestor, and the next by-name open would
cross the new reparse point before any tag check. Every held component now denies write
sharing again for the brief hold (verify through `CreateProcess` return); the fail-closed
exposure on a pre-existing write handle anywhere on the chain returns by necessity,
bounded to that hold, the same posture as the delete-sharing denial. Opening each child
relative to the held parent handle (`NtCreateFile` with `RootDirectory`) would need no
write denial at all; deferred, for the maintainers' triage.
Round 90: main's #18732 added the managed-agent shadow refusal to the kiro-cli spawn
preparation in `acp/client.py`; the fence holds that block re-indented under its verify,
so the seven lines are re-homed inside the held copy at main's position (the union is
mechanical; no unindented copy remains). The seams pin lists the new call,
`managed_agent_shadow_refusal`, as a tracked #17395 residual: like the other listed
preparation reads it takes the work dir's name after the verify, on main's own code.
Round 92: main's #19222 gives each new owner chat its own session folder and tests the
project-linked-folder arm with a create that files into a bound folder; under this fence a
create that would inherit a binding is admitted only for the person, so the test's owner
helper now carries the positive `is_dashboard_user` stamp (`stamp_the_person`), as the
fence's own folder tests do. Test-only; the gate is unchanged. A per-chat session folder
is a project a non-recording writer set, so the first spawn re-pins it like a restored
slot (cold start, PATH entries inside it screened), the same as any bound directory.
Round 93: two review findings on the fence's own code, both fixed. (1) `revive_session`'s
folder-filing refusal raised a plain `SessionControlError`, bypassing the verb's `deny`
factory, so that 403 wrote no SEL `denied` row while every other refusal of the verb does;
it is re-raised through `deny` now (`test_revive_filing_refusal_is_an_audited_denial`).
(2) `asyncio.to_thread` cannot interrupt its thread: a cancellation inside `verified_hold`
(an ordinary tab close during preparation) raised at once while the preparation or the
saved-capability recheck kept resolving the bound directory's name, and the hold's
`finally` released the pinned chain under it, re-opening the swap window on Windows. Every
off-loop step inside the hold is awaited through `_drained` now: a cancellation waits for
the worker to return, the chain is released after it, and `CancelledError` then propagates
(`test_a_cancelled_step_keeps_the_hold_until_its_worker_returns`; the seams pin derives
every held off-loop sink and refuses a bare await).
Round 94: three follow-ups on Round 93. (1) The hold-drain test waited with a fixed
sleep as its barrier; its step now parks on an `Event` (`until_parked` is the handshake
before the cancel) and the property is the order at the task's completion. (2) The same
cancellation gap at the spawn hold in `acp/client.py` and `acp/runtime.py`: every
`to_thread` offload inside that hold (the workspace preparation, the agent
materialisation, the fork-governance and shadow checks, the launch-path resolution) was
awaited bare, so a cancellation released the handle chain while a thread still resolved
the directory's name. The drain is `kiro_crew.sandbox.drained` now, shared by the
`verified_hold` sites and the spawn holds, and a seams pin derives every offload inside
the spawn holds and refuses a bare await. (3) The PR's own short fixed waits (a 10 s
`wait_for`, a 5 ms poll loop, a turn budget before a lock wait) now await their signal
through `kiro_crew.testing.wait` (`await_until`, `async_wait_until`, `until_parked`,
`wait_until`), as main's wait-discipline ratchet requires.
Round 95: the spawn-hold drain finished. (1) The hold's coroutine steps that offload by-name
reads of their own are drained as a whole: the adapters' `resolve_spawn` and
`prepare_spawn_env`, the runtime's `_resolve_spawn_plan` and its projected-spec handshake,
and both `_to_thread_guarding_sandbox` helpers drain inside; the seams pin lists those
callees and refuses a bare await. `launch` is not drained: the process-creation tail's
bookkeeping must not be deferred past a cancel. (2) `drained` logs its first deferral
(DEBUG), the handshake a test waits on before asserting the hold is still held. (3) One
behavioural test per spawn hold: a cancel while the first name-touching worker still
runs; the spawn keeps waiting (an undrained spawn unwinds and releases under the worker:
`['released']`), the release follows the worker's return, the caller is cancelled. D1
waits only.
Round 96: the runtime's cancel-during-preparation test now runs once per name-touching
worker the spawn hold reaches (the voice-runtime check, the sealed-target probe the spawn
plan's harness arm offloads, the skill projection), so the plan resolution's drain is
proven behaviourally, not only by the seams pin: on the previous production code the
spawn-plan case unwinds and releases under the probe (`['released']`). Test-only.
Round 97: two hold tests asserted on a release the hold's `finally` schedules off the loop
without awaiting (the verified-hold drain test, right after the cancelled task ended; the
name-touch hold test, after the manager closed), so a slow executor could fail correct
code; both now wait for the releases to land (`async_wait_until`) before asserting.
Test-only.
Round 98: replayed onto main after its 17:04-17:30Z merge burst. The one conflict was
`error-code-baseline.json`, where both sides had lowered `missing_code` by one (this
change in `dashboard/chat_handlers.py`, main in `dashboard/file_api/uploads.py`); the file
is regenerated with the repository's own generator (`python
test/test_error_code_contract.py --update`) on the merged tree, so the totals follow the
per-file map (`missing_code` 1045, `_compliant` 2706). Seventeen other files main also
touched merged on their own. No content change.
Round 99: the Windows chain keeps a followed volume mount point's OWN handle. The walk
used to close the mount point's no-follow handle once the mounted volume's root was
open, so from then on nothing held the mount point's name on the host volume: a
same-account writer could rename it away and plant a symlink at its name, and the
walk's next by-name open of the child would follow that intermediate component (the
no-reparse flag covers the final component only), a share included. `pin_directory`
now appends the mount-point handle to the caller's held chain (`hold_through`), held
without delete or write sharing beside the volume root until the chain is released,
and refuses the follow for a caller that passes no chain. Red-first:
`test_the_mount_point_name_stays_held_beside_the_volume_root_until_the_chain_is_released`
(on the previous code the held chain carried no mount-point handle).
Round 100: replayed onto main after #19331 rewrote the waits in `test/test_acp_runtime.py`.
The one conflict was that file's import of `kiro_crew.testing.wait`: main's line names
`async_wait_until, await_until, default_timeout`, this change had added `async_wait_until`
alone; main's superset is kept. The rest of the rewrite merged on its own. No content
change.
Round 101: replayed onto main after #19584 moved the three pure ownership helpers
(`_folder_owner_app`, `_subtree_holds_foreign_folder`, `_is_descendant`) out of
`dashboard/chat_folders.py` into `dashboard/folder_ownership.py`, re-exported from where
they were. The first conflict was that file: this change had inserted its inheritance and
filing functions between the two moved helpers and added one sentence to
`_subtree_holds_foreign_folder`'s docstring. Main's move is kept: the helpers are defined
once, in main's module, and reach this file through main's re-export; the inserted functions
stand where the helpers were; the docstring sentence goes with the function it described
(the rule it stated, that an agent may not change an existing binding at all, is
`api_chat_folder_update`'s `_agent_binding_refusal`). Main then merged #18342 (the plain
session is the default template, never the default crewmate), which appends a test to
`test/test_chat_agent_selection.py` where this change appends its re-pin test; both stand,
main's first. Every other file main touched merged on its own. No content change.
A folder's `steering_dirs` is a host-file READ the unsandboxed gateway performs on the folder's behalf and reads into the model context of every chat the folder delivers it to — for a folder the person owns, the person's chats. The gate from #11827 refused a declaration from an app or an admitted crew member, keyed on the folder principal; an ordinary dashboard session's tool call, a channel session's and a cron's carried no principal and were admitted, so any of them could point a folder at an arbitrary readable Markdown tree and put those words in front of the person's next chat, with no tool grant and no signal. The gate now keys on the same positive facts as the folder-binding fence in the commit before this one (`_is_the_person`: the token middleware's `is_dashboard_user` stamp, which only a non-app dashboard token earns, and the owner predicate on its subject), and the person is read FIRST: a non-empty `steering_dirs` a request from anyone else names is refused at both write sites (create and PATCH), before any path is touched, with the gate's own 403 `steering_dirs_forbidden`, audited against the caller's principal or — for a session nobody else names — its session key (`_agent_audit_caller`). Clearing to `[]` stays allowed for every principal, as config.md records (it only removes reads); whether an agent's clear should be refused too is a recorded decision for a maintainer, filed as #16453. An absent field is no mutation. The person's own sidebar calls are unaffected and the person may still declare or clear steering on a folder an app or member owns, delivered as before. Same harm class as the binding fence — a caller other than the person shaping what the gateway reads into the person's chats — split into its own commit because it is a distinct behaviour change to main's #11827 gate: a bisect of a steering refusal lands here. The gate's refusal runs through the fences' one tail (`_person_gate_refusal`): the operator's own pre-owner session is answered `401 stale_session_reauth`, as at every other refusal the person predicate decides; every agent keeps the 403. The gate's refusal is audited against attested identity only, as every fence refusal is: the two pins that read the bare `X-Session-Key` as the caller now read it only on a kernel-attested peer, and `unattributable` otherwise.
|
Round 104 at 3324893: replayed onto main 9ed3c04 (its tip at push time). Rebase only, no content change; the previous head d2f78a8 had become CONFLICTING against main in two files. src/kiro_crew/dashboard/chat_fork.py: main's #11015 (a720ae5, "feat(apps): let a contributed command name one of its app's own agents") makes a fork inherit the parent slot's app-agent binding ( |
Sensitive change reviewHead 3324893 (Round 104). The one sensitive path in the diff is
|
|
Per-head record for 3324893 (Round 101, rebase only): the records already filed stand for this head: the Design Review and First Principles records (comment 6106363271; the Round 96 record 6125701883; the Round 99 addendum 6132303833, where First Principles names #17395 as the deferral target; the Round 100 record 6132677379), the Round 93 dispositions (comments 6119259038, 6119259294), the Round 94 and Round 95 dispositions on the spawn-hold drain (comments 6120019738, 6120840912), the Round 97 GPT 6.1 disposition (comment 6126584107), the Round 99 GPT 6.1 disposition on the held mount-point handle (comment 6131518190), the earlier GPT 6.1 disposition (fixed in Round 89; comment 6105970083) and the Design disposition on the chain hold (comment 6105970221). On the previous head 7eafadb every lane but First Principles was green: GPT 6.1 no blocking findings, Opus 5.5 PASS, Design Review PASS, UX, SAST, Security Scope and Sensitive Change Review passing, every backend, Windows and macOS shard, Lint and Coverage Gate green; this head carries that content unchanged over main's #19584 helper move and #18342 default-template change. The First Principles block (items 3 and 5: the spawn-time directory pin and the steering commit's #11827 retune as outside the Goal; clears when split out or a human amends the Goal) is the owner's decision; so is the CHANGES_REQUESTED review 5484249734 (the split ask). The 2026-10-09 CHANGES_REQUESTED review 5475625965 stands as recorded on GitHub; its author's 2026-10-13 review 5497561885 says the request is resolved on their side and that the remaining questions (the scope question First Principles is red on, the split, a maintainer's sign-off on the sandbox paths) are a maintainer's. Nothing is argued or changed toward or against any of them in this round. The owner's open questions (live Windows run; the spawn-time pin as its own PR) are unchanged. |
|
Per-head record addendum for 3324893 (Round 101). Design Review published BLOCK on this head at 07:08Z (comment 5812998773) where it had published PASS on the previous head, 7eafadb, whose content this head carries unchanged. The blocker is the Windows handle chain's write-sharing denial on every held ancestor (Rounds 87 to 89) and its clear condition is a live Windows run with a project under an active OneDrive sync root and under the user profile, or the chain ceasing to deny write sharing on ancestors (the record names the alternative the code itself defers, opening each child relative to the held parent handle). Its watch item is the standing scope question (the spawn-time identity fence as its own change), the same question First Principles blocks on. Both are the owner's decisions and are recorded here as such; nothing is argued or changed toward or against either, and no override is requested. The earlier records stand (6139934209 and the records it lists). |
|
Per-head record, Design Review on 3324893 (follows 6140466529). The Design Review block (5812998773) and the First Principles block are two lanes on the same subject, the spawn-time directory pin (#17395 names the deferral target), and that subject is the owner's decision; neither is fixed, overridden or argued in this round. One factual line on the blocker's premise: the Windows handle chain denies WRITE sharing only, so read handles on an ancestor (directory enumeration, change notification) do not conflict with the hold, and no live Windows run exists to settle which handles an active OneDrive sync root holds, so the premise is unverified in both directions. |
|
Per-head record for 3324893 (Round 103): Design Review published CONCERNS on this head at 22:19Z (comment 5812998773, updated in place), an advisory verdict, where it had published BLOCK on the previous heads 0f4116c and 2a7fdad. What the lane says: two watch items on the spawn-time identity pin, that its cost (a bound chat spawns cold and the agent loses PATH entries inside the bound project, an activated .venv/bin among them) lands on the person's own bindings once only the person can set, clear or reroute a binding, clearing when the change names the threat that still reaches a person-made binding or limits those costs to the bindings that threat can reach; and that the change carries two things, the person-only gate with the UNC refusal and the spawn-identity machinery (cwd_identity on get_or_create, the Windows handle-chain walk, the hold spanning process creation at both ACP spawn sites), clearing when the pin ships as its own change or a live Windows run binds and spawns on a OneDrive placeholder project and on a Dev Drive mount; its suggestion is to land the gate and the UNC refusal first and judge the pin on its own once #17395 makes the by-name reads descriptor-relative. Both items are the standing scope question (split the pin out or keep it, the same question a maintainer's review 5484249734 asked), which is the owner's open decision; the live Windows run is the owner's as well. No code on this head changes for this verdict, nothing blocks, no override is requested and nothing is argued toward or against the items here. The earlier records stand (6155971485, 6155973864 and 6155975947, and the records they list). |
|
Per-head record for 3324893 (Round 103): First Principles Review published CONCERNS on this head at 22:19Z (comment 5813016080, updated in place; run 38473647492), an advisory verdict, where it had published BLOCK on the previous heads. What the lane says, under "Not justified as shipped": item 6, the spawn-time identity pin, is oversized against the frozen Goal (the Goal covers who may bind and the UNC refusal, not a directory swapped between check and spawn), makes every bound chat cold-start and drops PATH entries inside the project, and is still incomplete on POSIX by the change's own account (by-name reads stay open between verify and spawn, #17395); its subtraction is to remove cwd_identity, verified_hold and the spawn-hold plumbing in acp/client.py, acp/runtime.py, acp/launch.py, session_allocation.py, state.py and the identity functions in sandbox.py and defer them to #17395, items 7 and 8 going with it, clearing when the mechanism is removed or a human amends the Goal; item 4, the steering commit widens the #11827 steering_dirs gate, its subtraction being its own change, clearing the same way; item 10, the 401 stale_session_reauth answer is declared only in the commit message. Items 6 and 4 are the standing scope question (split the pin and the steering commit out or keep them), which is the owner's open decision, as a maintainer's review 5484249734 asked; item 10 names the description, not the code. No code on this head changes for this verdict, nothing blocks, no override is requested and nothing is argued toward or against the items here. The earlier records stand (6155971485, 6155973864 and 6155975947, and the records they list). |
|
CI note on 3324893 (base 9ed3c04, main's tip at push time). Base proof: main's tip has no completed run of its own yet (its runs on the intermediate tips were cancelled by the next merge and the run on the tip is behind the Actions backlog with no concluded Backend Lint failure), so this once the gate on the merged tree (lint, types, the black and comment-history ratchets, the brand gate, docs lint, 218 serial and 5,967 parallel tests, listed in the round note) stands in for the base proof. Reds on this head are read against main's own run on the base as it publishes: a red main shares there is inherited and cited by its log, not re-run. Two local-runner classes are known and are not this change's: test_acp_spawn_offload.py::TestRuntimeProjectedLaunchDocuments and code_review_sage's test_store_ancestor_chain.py fail on this runner on pristine main whose CI is green, like the test_mcp_cron_security descriptor-closed cases; CI judges them. On the previous head d2f78a8 the Opus 5.5 Review lane published no verdict: its run 38473647473 failed closed twice in "Capture discovery candidates" with no [OPUS-DISCOVERY] marker for that head (attempt 1 at 22:20Z with a 264 character discovery result, attempt 2, its one re-run, at 23:24Z with an 81 character result, no permission denials either time), a lane read fault cited here and not re-run again; this push supersedes that head, and the lane runs afresh on this one. PR Readiness and the readiness signal are red on the standing change request (#17078); Design Review and First Principles Review read CONCERNS (advisory) on the previous head on the owner's open scope decision (records re-posted for this head). Carried over per head: |
|
Per-head record for 3324893 (Round 104): First Principles Review published BLOCK on this head at 00:12Z (comment 5813016080, updated in place), where it had published CONCERNS on the previous head d2f78a8 whose content this head carries unchanged over main's #11015, #18469 and #19909 lines. What the lane says, under "Not justified as shipped" and "Blockers": item 5, premise risk, the Windows spawn's cloud-files placeholder arm (a placeholder admitted by its documented reparse tag, an unreadable tag or target refused) has had no live run, which the description itself lists under Not a goal, clearing when someone runs a bound-chat spawn on Windows against a OneDrive Files On-Demand folder, a junction-crossing path and a Dev Drive; item 5, oversized, the swap between check and spawn is outside the Goal (who may bind, and refusing UNC paths) and the pin is partial by the change's own account (preparation reads still open the directory by name, #17395), its subtraction being to drop the cwd_identity and WorkspaceHold threading through session_allocation.py, acp/client.py, acp/runtime.py, acp/launch.py and platform_compat.py and defer it to #17395, clearing when the mechanism is removed or a human amends the Goal; item 4, oversized, the steering commit changes main's #11827 steering_dirs gate, which is not in the Goal, its subtraction being to drop that commit, clearing the same way; item 8, the scaffold create-rate limiter's deletion rides along. The live Windows run and the scope question (keep the pin and the steering commit in this change or split them out, the question a maintainer's review 5484249734 asked) are the owner's open decisions and are recorded here as such; no code on this head changes for this verdict, no override is requested and nothing is argued toward or against the items. Design Review reads CONCERNS (advisory) on this head on the same subject. The earlier records stand (6157656042, 6157657368, 6157658613, 6157659749, 6157661195 and the records they list). |
|
CI note on 3324893: Opus 5.5 Review run 38486676344 attempt 1 failed closed at 00:16:28Z in its "Capture discovery candidates" step: the discovery pass ended with a 37 character result carrying no [OPUS-DISCOVERY] marker for this head (marker_in_assistant=false, no permission denials), so the gate refused to validate an unverified candidate list and published no verdict for this head. The same lane read fault as on the previous head, not a finding about the change: the run is re-run once in this change's own window; a second death of the same kind is cited here and left. No file on this head is changed for it. |
|
CI note on 3324893: Opus 5.5 Review run 38486676344 attempt 2, its one re-run, failed closed the same way at 01:14:03Z ("Capture discovery candidates": a 30 character discovery result with no [OPUS-DISCOVERY] marker for this head, no permission denials, the review step skipped), so the lane has published no verdict for this head after two attempts on this head and two on the previous one (38473647473). Cited as a lane read fault and not re-run again; no file on this head is changed for it. |
|
Round 105 at a26fbab: replayed onto main 4d37295 (its tip at the pre-push read). Rebase only, no content change; the previous head 3324893 had become CONFLICTING against main in three files, all from main's #20333 (2e91a8c, "refactor(dashboard): split chat_handlers selection and approval routes"), which moved the agent, model, effort, relaunch, approval and several other route families out of Placement table (this change's chat_handlers.py hunks, where they live now):
The handlers module re-exports the three helpers from their owners the way it re-exports every moved definition.
Interdiff against 3324893 outside those files: empty; inside them, every added and removed line of this change is present in its new home (the only new lines are the Gates: the resolved stack was gated over main 044dbde, then re-picked unchanged (range-diff identical, both commits) onto d1ae19b, where the handlers composition contract, the two writer-census pins, the slot-reader pin and the error-code ratchet were re-run serially (294 tests green), and onto the tip 4d37295, whose one further commit (#20409, lint baseline rows) touches no file this change touches. On the gated stack: isort, flake8, the baselined black gate, the comment-history gate at the merge-base, mypy (2,341 files), the brand gate on added lines and docs lint clean; 6,040 tests green with 34 skipped across this change's own 26 test files and the route-module and handlers-module tests (the handlers composition contract, the slot-reader and writer-census pins, the error-code ratchet, the start-priority, body-guard, approval-mode and orphaned-card guards #20333 touched, dashboard chat, chat agent selection, the slot create, project, agent-scope and fork tests, test_acp_client.py, test_acp_runtime.py, test_eager_spawn.py, session_control with revive and fork, the chat folder routes and tools, the steering gates and the card test). The targeted set plus lint is the local gate this round; the full local gate did not run (two of its files, test_acp_spawn_offload.py::TestRuntimeProjectedLaunchDocuments and code_review_sage's test_store_ancestor_chain.py, fail on this runner on pristine main and are a local-runner class, like the test_mcp_cron_security descriptor-closed cases; CI judges them). |
Sensitive change reviewHead a26fbab (Round 105). The one sensitive path in the diff is
|
|
Per-head record for a26fbab (Round 101, rebase only): the records already filed stand for this head: the Design Review and First Principles records (comment 6106363271; the Round 96 record 6125701883; the Round 99 addendum 6132303833, where First Principles names #17395 as the deferral target; the Round 100 record 6132677379), the Round 93 dispositions (comments 6119259038, 6119259294), the Round 94 and Round 95 dispositions on the spawn-hold drain (comments 6120019738, 6120840912), the Round 97 GPT 6.1 disposition (comment 6126584107), the Round 99 GPT 6.1 disposition on the held mount-point handle (comment 6131518190), the earlier GPT 6.1 disposition (fixed in Round 89; comment 6105970083) and the Design disposition on the chain hold (comment 6105970221). On the previous head 7eafadb every lane but First Principles was green: GPT 6.1 no blocking findings, Opus 5.5 PASS, Design Review PASS, UX, SAST, Security Scope and Sensitive Change Review passing, every backend, Windows and macOS shard, Lint and Coverage Gate green; this head carries that content unchanged over main's #19584 helper move and #18342 default-template change. The First Principles block (items 3 and 5: the spawn-time directory pin and the steering commit's #11827 retune as outside the Goal; clears when split out or a human amends the Goal) is the owner's decision; so is the CHANGES_REQUESTED review 5484249734 (the split ask). The 2026-10-09 CHANGES_REQUESTED review 5475625965 stands as recorded on GitHub; its author's 2026-10-13 review 5497561885 says the request is resolved on their side and that the remaining questions (the scope question First Principles is red on, the split, a maintainer's sign-off on the sandbox paths) are a maintainer's. Nothing is argued or changed toward or against any of them in this round. The owner's open questions (live Windows run; the spawn-time pin as its own PR) are unchanged. |
|
Per-head record addendum for a26fbab (Round 101). Design Review published BLOCK on this head at 07:08Z (comment 5812998773) where it had published PASS on the previous head, 7eafadb, whose content this head carries unchanged. The blocker is the Windows handle chain's write-sharing denial on every held ancestor (Rounds 87 to 89) and its clear condition is a live Windows run with a project under an active OneDrive sync root and under the user profile, or the chain ceasing to deny write sharing on ancestors (the record names the alternative the code itself defers, opening each child relative to the held parent handle). Its watch item is the standing scope question (the spawn-time identity fence as its own change), the same question First Principles blocks on. Both are the owner's decisions and are recorded here as such; nothing is argued or changed toward or against either, and no override is requested. The earlier records stand (6139934209 and the records it lists). |
|
Per-head record, Design Review on a26fbab (follows 6140466529). The Design Review block (5812998773) and the First Principles block are two lanes on the same subject, the spawn-time directory pin (#17395 names the deferral target), and that subject is the owner's decision; neither is fixed, overridden or argued in this round. One factual line on the blocker's premise: the Windows handle chain denies WRITE sharing only, so read handles on an ancestor (directory enumeration, change notification) do not conflict with the hold, and no live Windows run exists to settle which handles an active OneDrive sync root holds, so the premise is unverified in both directions. |
|
Per-head record for a26fbab (Round 103): Design Review published CONCERNS on this head at 22:19Z (comment 5812998773, updated in place), an advisory verdict, where it had published BLOCK on the previous heads 0f4116c and 2a7fdad. What the lane says: two watch items on the spawn-time identity pin, that its cost (a bound chat spawns cold and the agent loses PATH entries inside the bound project, an activated .venv/bin among them) lands on the person's own bindings once only the person can set, clear or reroute a binding, clearing when the change names the threat that still reaches a person-made binding or limits those costs to the bindings that threat can reach; and that the change carries two things, the person-only gate with the UNC refusal and the spawn-identity machinery (cwd_identity on get_or_create, the Windows handle-chain walk, the hold spanning process creation at both ACP spawn sites), clearing when the pin ships as its own change or a live Windows run binds and spawns on a OneDrive placeholder project and on a Dev Drive mount; its suggestion is to land the gate and the UNC refusal first and judge the pin on its own once #17395 makes the by-name reads descriptor-relative. Both items are the standing scope question (split the pin out or keep it, the same question a maintainer's review 5484249734 asked), which is the owner's open decision; the live Windows run is the owner's as well. No code on this head changes for this verdict, nothing blocks, no override is requested and nothing is argued toward or against the items here. The earlier records stand (6155971485, 6155973864 and 6155975947, and the records they list). |
|
Per-head record for a26fbab (Round 103): First Principles Review published CONCERNS on this head at 22:19Z (comment 5813016080, updated in place; run 38473647492), an advisory verdict, where it had published BLOCK on the previous heads. What the lane says, under "Not justified as shipped": item 6, the spawn-time identity pin, is oversized against the frozen Goal (the Goal covers who may bind and the UNC refusal, not a directory swapped between check and spawn), makes every bound chat cold-start and drops PATH entries inside the project, and is still incomplete on POSIX by the change's own account (by-name reads stay open between verify and spawn, #17395); its subtraction is to remove cwd_identity, verified_hold and the spawn-hold plumbing in acp/client.py, acp/runtime.py, acp/launch.py, session_allocation.py, state.py and the identity functions in sandbox.py and defer them to #17395, items 7 and 8 going with it, clearing when the mechanism is removed or a human amends the Goal; item 4, the steering commit widens the #11827 steering_dirs gate, its subtraction being its own change, clearing the same way; item 10, the 401 stale_session_reauth answer is declared only in the commit message. Items 6 and 4 are the standing scope question (split the pin and the steering commit out or keep them), which is the owner's open decision, as a maintainer's review 5484249734 asked; item 10 names the description, not the code. No code on this head changes for this verdict, nothing blocks, no override is requested and nothing is argued toward or against the items here. The earlier records stand (6155971485, 6155973864 and 6155975947, and the records they list). |
|
Per-head record for a26fbab (Round 104): First Principles Review published BLOCK on this head at 00:12Z (comment 5813016080, updated in place), where it had published CONCERNS on the previous head d2f78a8 whose content this head carries unchanged over main's #11015, #18469 and #19909 lines. What the lane says, under "Not justified as shipped" and "Blockers": item 5, premise risk, the Windows spawn's cloud-files placeholder arm (a placeholder admitted by its documented reparse tag, an unreadable tag or target refused) has had no live run, which the description itself lists under Not a goal, clearing when someone runs a bound-chat spawn on Windows against a OneDrive Files On-Demand folder, a junction-crossing path and a Dev Drive; item 5, oversized, the swap between check and spawn is outside the Goal (who may bind, and refusing UNC paths) and the pin is partial by the change's own account (preparation reads still open the directory by name, #17395), its subtraction being to drop the cwd_identity and WorkspaceHold threading through session_allocation.py, acp/client.py, acp/runtime.py, acp/launch.py and platform_compat.py and defer it to #17395, clearing when the mechanism is removed or a human amends the Goal; item 4, oversized, the steering commit changes main's #11827 steering_dirs gate, which is not in the Goal, its subtraction being to drop that commit, clearing the same way; item 8, the scaffold create-rate limiter's deletion rides along. The live Windows run and the scope question (keep the pin and the steering commit in this change or split them out, the question a maintainer's review 5484249734 asked) are the owner's open decisions and are recorded here as such; no code on this head changes for this verdict, no override is requested and nothing is argued toward or against the items. Design Review reads CONCERNS (advisory) on this head on the same subject. The earlier records stand (6157656042, 6157657368, 6157658613, 6157659749, 6157661195 and the records they list). |
|
CI note on a26fbab (base 4d37295, main's tip at the pre-push read). Base proof: main's tip has no completed run of its own yet (the runs on the intermediate tips were cancelled by the next merge and the run on the tip is behind the Actions backlog with no concluded Backend Lint failure), so this once the gate on the merged tree (lint, types, the black and comment-history ratchets, the brand gate, docs lint, 6,040 tests across this change's own test files and the route-module and handlers-module tests, listed in the round note) stands in for the base proof. Reds on this head are read against main's own run on the base as it publishes: a red main shares there is inherited and cited by its log, not re-run. Two local-runner classes are known and are not this change's: test_acp_spawn_offload.py::TestRuntimeProjectedLaunchDocuments and code_review_sage's test_store_ancestor_chain.py fail on this runner on pristine main whose CI is green, like the test_mcp_cron_security descriptor-closed cases; CI judges them. On the previous head 3324893 the Opus 5.5 Review lane published no verdict: its run 38486676344 failed closed twice in "Capture discovery candidates" with no [OPUS-DISCOVERY] marker for that head (attempt 1 at 00:16Z and its one re-run at 01:14Z, 37 and 30 character discovery results, no permission denials either time), a lane read fault cited there and not re-run again; this push supersedes that head, and the lane runs afresh on this one. PR Readiness is red on the standing change request (#17078) and on the First Principles BLOCK, which read BLOCK on the previous head on the owner's open scope decision (the spawn-time pin and the steering commit, #17395 named as the deferral target) while Design Review read CONCERNS (advisory) on the same item; the records are re-posted for this head and no code changes on it for them. Carried over per head: |
Problem / Motivation
Goal: A sidebar folder's
project_dirbinding -- set, cleared, or rerouted through a folder move -- is accepted only from the person's and a member's own principal, and a request-named path is refused as UNC text before anything resolves it.A folder's
project_diris the project, cwd and steering root of its chats. Onmain any admitted caller could set or clear it, an agent could move a folder
under or out of a bound one and rebind its chats, and a request-named path was
realpath'd with no UNC check (\\host\shareopened an SMB connection).Not a goal
steering_dirs: []clear reversal (config.mdallows a clear for every principal; GPT would refuse it): held.Why it matters
A folder's project directory is the one zero-cost path to a project-scoped
session: whoever sets a binding or routes a chat under one chooses the cwd the
person's next chat runs in and the steering it reads. That stays the person's
choice; the gateway opens no network connection on agent-typed path text.
What changed (motivation → approach → change)
A folder binding is the person's:
dashboard/chat_folders.pyaccepts aproject_dirset, clear or move-reroute only when two positive facts say therequest is the person's (
is_dashboard_userstamp,is_owner_dashboard_request);every other principal is refused with 403
folder_project_dir_forbidden, as is a non-person move or filing that wouldchange the binding or steering a subtree resolves
(
chat_handlers.py,chat_threads.py,handlers/side.py,chat_fork.py,session_control.py,session_directive_apply.py,handlers/_shared.py), anon-person
steering_dirsdeclaration (a clear stays allowed, perconfig.md;#16453 holds the question), and the scaffold routes
(
chat_folder_scaffold.py; itsapp.jsondrops the route permission). Anon-person
project_diris refused as UNC text before anything resolves it, thenopened ONLY through the pinned walk
(
pinned_fs.py,platform_compat.py): a link at any component is refused atthe open; no by-name step precedes the pin. The person's path meets
main's validators.
A binding is fenced only if its directory cannot be swapped between check and
spawn, so every binding records the directory's
(st_dev, st_ino)onthe slot (
state.py, read off the descriptor that opened it); theslot's chats carry it as
cwd_identitythroughsessions.get_or_create(
session.py;session_allocation.py, the allocation seam, resolves it for aproducer that passes none and for a restored directory BEFORE any probe of
the name, and runs its own name touches only inside
verified_hold;config/loader.py,session_lifecycle.pythread it) and theprovider (
providers/acp.py) to both ACP spawn sites(
acp/client.py,acp/runtime.py), wheresandbox.verify_agent_workspace_for_spawnre-opens the leaf, no link followed,compares, refuses a swap (remedy: re-bind). The hold is acquired before
any pathname probe and spans process creation (
acp/launch.py, handed the holdand the verified spelling): on Windows the
root-first handle chain (a junction at any component refused; a cloud-files
placeholder admitted by its documented reparse tag; a volume mount point
(device-GUID data, never a path) followed once; an unreadable tag or target
refused: fail-closed), on POSIX the
O_DIRECTORYdescriptor, also the child'schdir_fd: the child's cwd is pinned, the spelling is not -- thefork-governance, sealed-target, voice-guard, derived-spec, skill-projection
and adapter preparation reads still open the directory by name between verify
and spawn (#17395: descriptor-relative reads; the seams pin lists them); on Windows the held chain pins the spelling too
(
sandbox.py). A restored slot is re-pinned at its firstspawn. The workspace default (configuration, the pool's directory) is not a
binding: not examined, warm path kept; a chat binding it explicitly fences only
its own spawns. A bound spawn never claims a pooled child (
bypass_cwd_identity).mcp_dashboard.py's folder tools describe the fence;error-code-baseline.json;the packaging identity pin now confines
pinned_fsto exactly two handle-pinfunctions (
FILE_FLAG_OPEN_REPARSE_POINTallowed there alone); ahandle-relative walk elsewhere still fails the pin; rules in
docs/architecture/mcp.md,docs/system-specs/modules,src/kiro_crew/docs/session-control.md.Backwards compatibility
Tool surface unchanged. Reader: a non-person caller setting, clearing or
rerouting a folder
project_dir, declaringsteering_dirsor scaffolding gets403 where main admitted it; a
[]clear lands as on main; anagent-named project path through a link is refused, not re-spelled
(
project_dir_link); a project on a folder-mounted volume on Windows (a DevDrive,
C:\dev) binds and spawns; an orchestrator outside a project foldercan no longer dispatch a worker into one (
session_create(folder_id=X)from anunfiled caller is refused with
folder_project_dir_forbidden); the caller mustfirst be filed in, or bound to, a folder that holds X; the person's sidebar
writes are unchanged. A bound chat feels three things, tested:
session_allocation.py:_get_or_create_impl: a bound chat spawns cold, neverpooled (a pooled child verified nothing;
test_chat_slot_project.py::TestABoundSlotNeverReceivesAPooledProcess).sandbox.py:_pinned_spawn_path: the agent loses PATH entries inside the boundproject (an activated
.venv/binresolves no program through a pinned cwd; useabsolute paths or bind the parent;
test_spawn_exec_shim.py::test_chdir_fd_with_only_workspace_path_entries_resolves_nothing).chat_folder_scaffold.py:api_chat_folders_scaffold: the create-rate limiter isgone (person-only routes; the flood cannot reach them;
test_chat_folder_scaffold.py::test_the_person_scaffolds_without_a_throttle).Workspace-default chats keep the warm pool; nothing stored.
Tests
Red-first:
test_chat_folder_ownership.py,test_chat_folder_steering_dirs.py,test_folder_steering_principal_gate.py,test_mcp_dashboard_folder_project_dir.py,test_chat_slot_project.py(identity record, re-pin, restore first),test_session_control_revive.py,test_sandbox_argv.py,test_acp_client.py,test_acp_runtime.py(holdfirst),
test_platform_compat.py,test_project_directory_seams.py.Rounds 68-101: fence commit message (r73: hold claim to the child cwd,
by-name reads to #17395; r75: #15158 meta-only; r77: hold to
acp/launch.py; r78: autouse; r79/81: spies; r80-92/98/100/101: rebase; r82: UNCspies; r87-89: chain hold denies write; r93: audited revive refusal, drain;
r94: spawn-hold drain, signal waits; r95: helper drains, cancel tests; r96/97: test
waits; r99: mount-point handle held).
Gates: static, named files, lanes, push guard. History 5966583933ff.
Pattern harvest
Rule candidate: review-prompt (security): WHO is a positive stamp, never an
absence: identify the caller by the stamp the verifying layer wrote; refuse
everything else.
Manual verification
Route-backed tests drive the sidebar and tool requests; no live OneDrive run.
Related Issues
Refs #10432 (agent bind, open).
Deferred: #14120 (agent bind), #16453 (
[]clear), #17395; PRs #11827, #11680.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)