Repository navigation
Merged
Conversation
setup.sh writes deploy/org/.env from .env.example, and that file holds the AgentField key, the organization token, the hosted-chats secret, the server key and the model keys. Neither the root .gitignore nor deploy/org/.gitignore named it, so a `git add` of the folder would have published all of them. The image builds already left it out (.dockerignore and codeaf.Dockerfile.dockerignore, which gate/context-check.sh proves by planting one); this closes the git side. The templates stay tracked: .env.example, .env.stub and .env.stub.hosted. Any other .env.* copy, a backup or a second environment, is ignored too. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…sted chats run out of the box compose.yaml built the codeaf image with CODEAF_BINARY_FROM defaulting to `fetch`, which downloads the pinned release. No release has `codeaf sessionhost` yet, so a plain `docker compose up --build` produced a stack that could not run hosted chats. The three services that run the codeaf image (codeaf, runner, sessionhost) now share one build, `x-codeaf-build`, whose default is `source`: the binary is built from this checkout, the same build the published image is made from. That needs the repository root as the build context, so the build says so, and codeaf.Dockerfile.dockerignore lets the local-binary file in under that path too. `fetch` and `local` remain opt-in. The Dockerfile's own default stays `fetch`, because built by hand from deploy/org it has no source to build from. compose.yaml says when to flip the default back: once the release pinned in codeaf.Dockerfile answers `codeaf sessionhost --help`. README.md "Start it", "Turning it on" step 3 and the Railway note, and the headers of codeaf.Dockerfile and smoke.sh, no longer say that a plain build fetches the release. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…sted chat The entry said stopping a hosted chat stays the owner's whatever the role. The code lets anyone holding `manage` do it (hostedEnd in internal/factory/serve/hosted_proxy.go checks the manage verb, which the owner and the `full` role hold), and TestP2_7_HostedStopAndDeleteRequireManage has a person the chat is shared with at `full` stop it. The owner granting `full` is deliberate, so the entry now says what the code does; the code is unchanged. What stays the owner's on the wire is approving a command, settings and files. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…y by default Moving a chat was hard-coded to its owner (CodeAF #2890). Abir's call on 2026-11-24 was "owner-only move (configurable)", so the rule is now a policy setting, `chats.move_by`, beside `hosting`: - `owner` (also what an absent or empty value means): only the person who owns the chat moves it, and still needs manage on it. A policy stored before the field existed reads this way, and the default policy's JSON does not change, so behaviour and the refusal sentence are as they were. - `manage`: anyone who holds the manage verb on the chat can move it, which under the starting roles is whoever it is shared with at `full`. `edit` still cannot, a bot never can, and the chat stays its owner's. One guard comes with the opt-in: a person who is not the owner can move the chat into a workstream they can edit, never into their own My space, because the chat would then leave the place its owner keeps it and every grant on it would be dropped. Under the default that case cannot arise. The setting accepts only its two words (422 otherwise). The manual's sharing page has a section on it, with probes; deploy/org/README.md's policy reference and the app protocol's policy shape list the field. Tests: TestChatMoveRuleIsOwnerOnlyUntilTheOrganizationChangesIt, TestChatMoveRuleTakesOnlyItsTwoWords (acl), TestOrgPolicyStoredWithoutChatRulesReadsAsOwnerOnlyMove (store), TestChatMoveDefaultPolicyRefusesAManageHolder, TestChatMoveManagePolicyLetsAManageHolderMoveButNotAnEditHolder, TestChatMoveManagePolicyKeepsAnotherPersonsChatOutOfTheMoversSpace, TestChatMoveRuleTurnsBackToOwnerOnly and TestChatMoveRuleIsTheOperatorsToSetAndTakesTwoWords (serve). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…s true now Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Nov 25, 2026
AbirAbbas
added a commit
that referenced
this pull request
Nov 25, 2026
…ack (#2903) The hosted organisation line: a team-mode org server deciding every request through one access model (verbs, roles, grants and policy in SQLite), hosted chats run by the sessionhost under a per-chat uid inside a Landlock fence with minted model bearers, sealed keys and a git helper, shared chats acting through verbs, bots owned by their creator, the Hosting and chats policy settings, and a self-hosting stack (deploy/org Docker Compose, published images behind a leak gate, a Railway path). Consolidates #2894 #2895 #2896 #2898 #2899 #2900 and the follow-ups #2904 #2905 #2907 #2908 #2910 #2911 #2912 #2913 #2915 #2916 #2918 #2927 #2936 #2944. Proven by the full suite, a keyless Compose smoke, a hostile wire client, sandbox escape probes, a real-model run and a production-style install from the published images. Co-Authored-By: Santosh kumar <[email protected]> Co-Authored-By: ZeroPoint95 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four gaps between what the owner decided and what the code did on the
org/mainfeature line, found by the docs audit (#2908). One commit per item. Draft intoorg/main; nothing here goes todev.What changes
deploy/org/.envcan no longer be committed../setup.shwrites it from.env.exampleand it holds the AgentField key, the organization token, the hosted-chats secret, the server key and the model keys; no.gitignorenamed it.deploy/org/.gitignorenow ignores.envand any other.env.*copy, and keeps.env.example,.env.stuband.env.stub.hostedtracked. The image builds already excluded it (.dockerignore,codeaf.Dockerfile.dockerignore).docker compose up --buildruns hosted chats. Thecodeaf,runnerandsessionhostservices now share one build whoseCODEAF_BINARY_FROMdefaults tosource(this checkout, repository root as context).fetchandlocalstay opt-in. No release hascodeaf sessionhostyet, so the oldfetchdefault produced a stack that could not run hosted chats.compose.yamlsays when to flip it back and how to tell: the pinned release'scodeaf sessionhost --help.chats.move_byisowner(default, and what an absent value means) ormanage. Default behaviour and the refusal sentence are unchanged; withmanage, a holder of themanageverb can move the chat, aneditholder still cannot, a bot never can. One guard comes with the opt-in: a person who is not the owner cannot move the chat into their own My space.manageholder (thefullrole) stop and delete it, which is the owner's deliberate grant. The entry now says that; the code is unchanged.Validation contract
git check-ignore deploy/org/.envmatches; the three templates are not ignored;git statusstays clean after./setup.shcreates.env.codeaf sessionhost --helpwith the sessionhost's own message (CODEAF_SESSIONHOST_SECRET must be at least 32 characters long); the pinned release saysthere is no codeaf sessionhost.manageholder is refused withOnly the person who owns this chat can move it, and they need permission to manage it.Opted in: amanageholder can move the chat and aneditholder cannot. A policy document stored before the field existed reads as owner-only and the default policy's JSON has nochatskey.deploy/org/README.mdlists the field.Tests and proof
TestChatMoveRuleIsOwnerOnlyUntilTheOrganizationChangesIt,TestChatMoveRuleTakesOnlyItsTwoWordsTestOrgPolicyStoredWithoutChatRulesReadsAsOwnerOnlyMoveTestChatMoveDefaultPolicyRefusesAManageHolder,TestChatMoveManagePolicyLetsAManageHolderMoveButNotAnEditHolder,TestChatMoveManagePolicyKeepsAnotherPersonsChatOutOfTheMoversSpace,TestChatMoveRuleTurnsBackToOwnerOnly,TestChatMoveRuleIsTheOperatorsToSetAndTakesTwoWords, and the existingTestContractI*andTestAccessPolicyAPIstill passdeploy/org/gate/context-check.shpasses (17 planted files, includingdeploy/org/.env, kept out of the build context) with the repository root as contextcodeaf sessionhost --helprun inside it, image removedFor whoever merges this and #2908
#2908's "Secrets" paragraph in
deploy/org/README.mdsays no rule keeps.envout of git and tells the operator to add one. After this PR that is no longer true:.envis ignored. The two PRs also touch nearby lines ofdeploy/org/README.md,organization-sharing.mdandchat_test.go, so the second to merge needs a small rebase.🤖 Generated with Claude Code