Repository navigation
org: the Compose path walked as a stranger, docs corrected and a terminal path written - #2915
Merged
Merged
Conversation
…ready used The server log keeps the operator link of every start, so after the organization was claimed `./operator-link.sh` still printed the newest one: a spent link, with the script's own "already claimed" message never reached. Found walking the Compose path as a stranger. The script now asks the server to check the link (a read: it claims nothing and uses nothing up) and reports a used, expired or retired link instead of printing it. If the server cannot be asked it prints what the log has, as before. operator_link_test.sh runs it offline against a stand-in for `docker compose` and is a step of the org-images workflow beside the Railway script tests. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…stub` no longer crash-loops it gitstub refuses to start without GITSTUB_TOKEN, which only smoke.sh makes. In the `stub` profile that left a container restarting forever for anyone who turned the scripted model on by hand (the keyless way to try an organization), and `docker compose ps` never reached all-healthy. It is now profile `gitstub`; smoke.sh asks for it with the hosted part, as it already asked for the token there. compose_profiles_test.sh reads `docker compose config --services` for each profile and is a step of the org-images workflow. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… hosted chats The flag was in `codeaf chat`'s own usage error and in `codeaf chat --help`, and nowhere on the page an operator reads first, so a person setting up an organization could not find how a terminal reaches it. The flag law test now requires it there. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…alk of the Compose path found it wrong
Followed as a stranger with Docker Compose on one machine. What the README said and
what was true:
- No step said to clone the repository: the installer on the front page puts only the
program on a computer, and the images are built from the checkout.
- Ports 8787 and 8080 had to be free, and a taken one stopped `docker compose up` half
way ("port is already allocated") with nothing about it in the README.
- The keyless way to try an organization (the scripted model) was not written down; the
only keyless thing named was smoke.sh, which claims the organization itself and uses
the operator link up. Both now say so, and the scripted-model lines are given.
- The laptop paragraph said the operator link's `http://[::]:8787` works from the same
machine. `[::]` does not connect to the published port, and over 127.0.0.1 the server
refuses a password because Docker presents the request from its bridge, not loopback.
A trial needs a name and an HTTPS proxy: a verified recipe is added.
- `operator-link.sh` is described as printing a link once claimed; the link also
expires after 24 hours.
- The backup was a bare `tar` into a bind mount: root-owned and world-readable on a
default host, containing password hashes, sessions and the organization's token, with
no restore, nothing on stopping the services first and nothing on `sessions-data`.
Volume names were written as `codeaf-org_` only. Backup and restore are rewritten,
and both were run against a live stack.
- gitstub is listed under `--profile stub`; it is `--profile gitstub` now.
- setup.sh pointed at the smoke test for a keyless start; it points at the scripted model.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…path The ten minutes assumed a desktop app at three steps and a checkout it never told you to make. A person on a terminal could not join: nothing said where the sign-in token for `codeaf chat --org` comes from, how an invitation is made or redeemed without the app, or how a chat is shared (the manual says the app has no sharing buttons yet and the README names the route without its body). "From a terminal" now gives each request, verified against a running stack, and "Sharing a chat" gives the share. The guide listed no `--org`. Also written down: that a password needs HTTPS even from the server's own machine, which Docker does not present as its own; that the released `codeaf` has no `--org` yet; and that a guest's refused `--once` on a stopped chat starts it for the owner in one-shot mode and blocks the owner's window until the chat is stopped. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…trial needs THE MANUAL LAW for the two pages the walk found wrong. organization-start said anyone "connecting from another computer" needs HTTPS, which let the person on the same machine believe they did not; it now says everyone does and why, and what the operator link names without a public name. organization-hosted-sessions said the `--org` sign-in token was set or kept but never where it comes from; a section in the asker's words (join or sign in from a terminal, no desktop app) says, and the share request now carries its body. Four probes in their own words are added. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…TTPS too, and where the scripted lines go Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.
What this is
A stranger's walk of the Docker Compose path for a self-hosted organization, following only the published docs in order (README.md, docs/organizations.md, deploy/org/README.md and what they link to) on a machine that had never seen this code: stand up the stack, claim it as the operator, invite a second person who joins from a terminal, run a first hosted chat on the scripted stub model, share it at
view, then follow the backup and upgrade sections.The stack came up and every step could be completed, but 17 places in the docs were wrong, missing or out of order, and three of them also had a real code or script fault behind them. This PR fixes all of them.
The worst three
http://[::]:8787, which does not connect from the browser or the app on the same machine under Docker, and a password is refused over plain http because Docker's published port never looks like loopback to the server (https_required).CODEAF_PUBLIC_DOMAIN=localhostmakes the server restart in a loop. The README now has a "Trying it on one machine" recipe (Caddy with its own certificate authority, alocaltest.mename,CODEAF_TRUSTED_PROXIES), and the[::]claims are corrected.docs/organizations.mdhas a new "From a terminal" section with the exact requests (sign_up,POST /v1/access/links, sign in again,POST /v1/resources/session/<id>/grantswith its body), and the manual's organization pages say the same.accounts.json(password hashes),sessions.jsonand the organization token, used a bind mount that fails on Docker Desktop, and said nothing about restoring. It is rewritten (stdout form underumask 077, one archive per volume, a restore that was run).Code and script fixes (each its own commit, each with a test that fails on the old code)
operator-link.shprinted a link that had already been used. It now asks the server (verb: check) and says plainly when the link is spent, with the 24-hour lifetime and how to get a fresh one.deploy/org/operator_link_test.sh: 8 rows, 5 fail against the old script.gitstubwas in thestubprofile but exits withoutGITSTUB_TOKEN, which onlysmoke.shmakes, soCOMPOSE_PROFILES=stubcrash-looped it. It has its owngitstubprofile;smoke.shasks for it.deploy/org/compose_profiles_test.sh: 5 rows, 3 fail against the old file.codeaf --helpand the guide did not name--org. The usage text now does, andTestTheUsageNamesEveryFlagAPersonCanTyperequires it (the 123-line help cap is kept by folding the flags)..github/workflows/org-images.yml.The rest
Clone step before
cd deploy/org(E1); a taken port 8080 or 8787 stopsuphalf way, withAGENTFIELD_PORT(E2); a keyless route throughCOMPOSE_PROFILES=hosted,stuband its variables, which was previously only visible insidesmoke.sh(E3);smoke.shclaims the organization itself and must run on an unclaimed stack (E11); what the plain-HTTP start-up warning means behind a proxy (E16);--orgexists only in dev-channel builds, andcodeaf attachalso moves new windows to that factory untilcodeaf detach(E15, E17). The manual pages are updated in the same change (THE MANUAL LAW), with four new probes.Validation contract
gitstub)codeaf chat --org <url>and gets a stub replyviewand is read-only for themTests run
make test-focusfor the help and usage tests, and forinternal/manual(the four new probes, the old ones still reach their pages).deploy/org/operator_link_test.shanddeploy/org/compose_profiles_test.sh, each failing on the old files and passing on the new.SMOKE_HOSTED=1 ./smoke.shagainst a fresh Compose project on the final tree: 261 checks passed, 0 failed, including every section after restarting all the services, and the stack was taken down with its volumes afterwards.make pr-ready BASE=origin/org/main: the light gate, the touched-package laws andinternal/manualpassed locally. Thecmd/codeafleg ran out its 15-minute shard ceiling on a laptop busy with other work (many unrelated timing-sensitive tests timed out, none of them the usage or help tests), so I re-ran the usage, help, flag and org tests ofcmd/codeafalone (pass) and left the full package to CI, wheretouched codeaf,touched rest,light gate,windows native tests,gate self-testand the image builds are all green.Not covered by this walk
The desktop app (the sign-up, invite, token and share paths were checked as the requests the app sends), Docker on native Linux, Windows, a Caddy on the host with a public certificate, a real model key, published images, the full upgrade, email invitations and GitHub sign-in.
Open calls
viewguest'scodeaf chat --org <url> --session <chat> --onceon a stopped chat starts it for the owner in one-shot mode, and the owner's window then reads "already open in a different interactive or headless mode" until the chat stops or idles. Documented as a known limit; wants an issue and an engine-side fix.codeaf org join <link>that does the sign-up and keeps the token (ascodeaf attachdoes) would remove E6, E7 and E8 for good.trusted_proxiesis set.docker composeon the runner and have not run in CI until this PR does.No secrets, tokens or internal URLs are in the diff (loopback addresses appear only where the docs explain them); examples use
https://codeaf.example.com.🤖 Generated with Claude Code