Skip to content

fix!: security and reliability improvements - #309

Merged
artempartos merged 28 commits into
developfrom
artempartos/explore-repo-patterns-spec
Sep 25, 2026
Merged

artempartos merged 28 commits into
developfrom
artempartos/explore-repo-patterns-spec

Conversation

@artempartos

@artempartos artempartos commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Security and reliability improvements across the Rails app, the Temporal workers, the agent images, the frontend, CI and the docs.

The branch also keeps YJIT on outside development and test, keeps passwordless sudo for the Claude Code agent (agents install packages inside a session), and lets one GitHub organization be connected from several companies once the App's OAuth installer check is configured.

Behavior changes to expect

  • Someone watching a shared session gets a read-only terminal; the IDE and the writable terminal stay with the session's owner.
  • The viewer role is read-only everywhere in the web UI.
  • Changing an MCP server's URL clears its stored secrets; stdio MCP packages must name an exact version; MCP servers and OAuth endpoints on internal addresses are refused.
  • Trigger cooldowns are enforced.
  • A workflow step whose container fails to start now fails, instead of being reported completed.
  • The share_asset agent tool can also publish an output of the current workflow run or a file attached to a board task (never a company asset). The run page and the task drawer show the public link and let a writer stop sharing it.
  • Tool results older than TOOL_RESULTS_RETENTION_DAYS (30 days) are deleted.
  • On Kubernetes, a container tool whose image cannot be pulled fails after a minute with the pull error, instead of running into its timeout.
  • Claude Code and Codex no longer update themselves inside session containers; the version is the one the image ships.
  • Signing out everywhere (profile or admin) also signs out browsers that have not been used since this release.
  • Some project analytics figures change.

Deploying

  • Migrations are expand/contract, safe for a rolling deploy and for a rollback: new constraints and foreign keys land NOT VALID and accept the rows the previous release writes. A follow-up release validates them.
  • Rebuild and ship the agent images with this release.
  • The app's runtime ClusterRole needs get on pods/log: container tools on Kubernetes read their result from the pod's log.
  • Traefik terminal-auth middleware in aixle-infra (prod, staging, dev): authResponseHeadersRegex: ^(X-.*|Cookie|Authorization)$ and addAuthCookiesToResponse: [aixle_container]. The app repairs the middleware when a session starts, but helmfile apply would revert it.
  • New settings, all off by default (see docs/reference/configuration.md): ENCRYPTION_BIND_PURPOSE (switch it on once a rollback is no longer needed, then run bin/rails encryption:reencrypt), GITHUB_APP_CLIENT_ID / GITHUB_APP_CLIENT_SECRET, CSP_ENFORCE, ALLOWED_HOSTS, K8S_RESTRICTED_AGENT_PODS. Traefik TLS is now verified by default; set K8S_TRAEFIK_VERIFY_TLS=false where pods do not trust the certificate.
  • One-off tasks after the rollout, once no pod of the previous release is left: bin/rails maintenance:purge_plaintext_mcp_secrets and bin/rails maintenance:snapshot_skills.

Related issues

—

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Refactor / chore
  • Breaking change

How was this tested?

Locally in Docker on this branch, the equivalent of make check_all:

  • backend: 6248 tests, 0 failures, also with eager loading as on CI; line coverage 92.88%
  • system tests: 9/9 on assets built from this branch
  • rubocop (1852 files, no offenses), brakeman (0 warnings), zeitwerk:check, worker boot check
  • tsc, eslint (0 errors), steiger, vitest 1522/1522
  • gitleaks over every commit of the branch: no leaks

On a staging deployment of this branch, agent sessions (Claude Code, Codex) and automated workflow runs were driven through the UI, including roles, sharing, connectors, triggers and the board. The bugs this surfaced are fixed in the last commits.

Every migration was replayed from an empty database; the one historical data migration this branch rewrites was also run against the schema it originally ran on and compared row by row with the previous version.

Checklist

  • I read CONTRIBUTING.md.
  • All my commits are signed off for the DCO (git commit -s).
  • I have signed (or will sign) the CLA when the bot prompts me — or my
    organization has executed the Corporate CLA.
  • make check_all passes locally (tests, rubocop, brakeman, eslint, typescript).
  • I added/updated tests where it makes sense.
  • I updated documentation where it makes sense.
  • My commits use clear, descriptive messages.

🤖 Generated with Claude Code

artempartos and others added 14 commits September 25, 2026 02:45
Remediation pass from an internal architecture review across the Rails
app, Temporal workflows, agent images, frontend, CI and docs.

Rollout is expand/contract, safe for a rolling deploy and a rollback:
- New tenant CHECK constraints and foreign keys are NOT VALID and accept
  rows written by the previous release; the follow-up release validates
  them.
- Purpose-bound encryption is written only with
  ENCRYPTION_BIND_PURPOSE=true (off by default) and read either way;
  enable it once a rollback is no longer needed, then run
  encryption:reencrypt.
- Agent images must be rebuilt and shipped with this release.

BREAKING CHANGE: session viewers get a read-only terminal; the viewer
role is refused on every write; changing an MCP server's URL clears its
stored secrets; stdio MCP packages must name an exact version; agent
containers run without sudo; trigger cooldowns are enforced; tool
results older than 30 days are pruned.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
load_defaults 7.2 and later turn YJIT on, and production has run with it
since; the explicit `config.yjit = false` switched it off for no measured
reason. load_defaults 8.1 enables it everywhere but development and test.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
Agents install system packages inside a session. Claude Code is the one
image that runs a non-root user, because it refuses
--dangerously-skip-permissions as root, so it needs sudo, which
no-new-privileges and allowPrivilegeEscalation: false would break. The
adapter now says which runtime keeps setuid escalation; every other
runtime stays as hardened as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
Once containers are served from a host of their own, every serialization
of a session mints its URLs a fresh pass. A changed src reloaded the
terminal on every session update, and a frame reloaded after its pass
expired was refused even though the gate had already traded that pass
for a cookie. Frames now keep the URL they loaded until the route
changes, and the gate falls back to its cookie when the URL's pass has
expired.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
…nstaller is verified

A GitHub organization shared by two workspaces could only be connected to
the first one. With the App's user authorization configured, every new
connection is made by someone GitHub lists as able to see the
installation, so the one-company claim is only needed without it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
Outside development and test, stored files are presigned S3 URLs on the
bucket's own host. PDF previews load in a frame and audio/video as media,
so both would be blocked once CSP_ENFORCE turns the report-only policy on.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
The Lint department this branch enables flags an initialize that skips
super (Lint/MissingSuper).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
Where an asset host is configured, as the deploy image does, script-src
names it, and the pattern matched its URL instead of the scheme source.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
The SDLC: QA workflow drives staging through test/playwright/helpers and
reads its README first; the cleanup in this branch removed them along with
genuinely unreferenced files.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
A step whose container failed to start was reported completed. The cleanup
phase signalled container_finished from before_cleanup, before after_cleanup
marked the session failed, so CompleteStepActivity read a still-running
session and completed the step (seen on staging: step completed 0.3 s before
its session failed on "Waiting for cluster capacity").

The session's own ending now wakes its run: on_finished signals after commit,
as on_failed already did, and the strategy no longer signals early. Every
finish path collects outputs before the session finishes, and the stale
session sweeper, which finishes sessions itself, keeps waking the run.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
An agent could only share a project asset, so an output of the run it was
part of, or a file attached to the board task it was working on, had to be
promoted into project assets first. share_asset now takes a source: a project
asset (the default), an output of this workflow run, or a file attached to a
task on this project's board. Company assets still cannot be shared from a
project's session.

Workflow run and task assets get the same share columns assets have, and one
/share/:token viewer serves all three, sandboxed as before. The run page and
the task drawer show the public link and let a writer stop sharing it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
The connector form had no onError, so a refused Create or Save did nothing
visible. That now happens more often: stdio packages must be pinned and
internal addresses are refused. Each error shows under its field; an error for
a field the current transport does not render (a URL typed before switching
to stdio is still sent and checked) goes to an alert above the buttons.

The Command hint suggested an unpinned package, and the row's Delete button
was labelled "Edit" for assistive technology.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
The page kept the one-time token in state initialised on mount, then took it
out of the props. Enable and Regenerate are router.post visits, which Inertia
answers without remounting the page, so a token generated from the page was
never shown and was also gone from the props: the notice said "copy it now"
with nothing to copy. The state now takes each token as it arrives and drops
it once MCP is disabled.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
The drawer, the filters and the create form all offer Critical, but the bulk
Priority menu stopped at High, so a batch could never be raised to critical
and critical tasks could not be restored after a bulk change.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
@artempartos
artempartos force-pushed the artempartos/explore-repo-patterns-spec branch from ca920cb to d78b7b0 Compare September 24, 2026 19:08
artempartos and others added 14 commits September 25, 2026 03:15
ToolStrategy#on_failure sat below `private`, and ContainerService only calls
public hooks, so the hook was skipped without a word. A tool run whose
container failed kept its result "processing" forever, and the agent waiting
on it gave up after five minutes with nothing to report.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
The project total read usage statistics, while the per-agent breakdown read
each session's own totals, which stop at the moment the session ended. Usage
recorded later was in one and not the other: staging showed $2.04 against
$1.89. Both breakdowns also counted setup sessions that the totals leave out.
They now read the same rows as the totals.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
zod 4 probes `new Function` on the first object parse, and the CSP (no
'unsafe-eval') reported that probe as a violation on every page.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
A viewer saw Retry run on every failed card and the server refused it. The
board already hides its other write controls from people who cannot run
workflows.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
Archive/Unarchive, and Download and Delete on a task's files, were icon
buttons without an accessible name, so a screen reader announced them as
"button".

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
The kubelet keeps a pod whose image pull failed Pending and retries with
backoff, so a tool pointing at a missing or unreadable image waited out
its whole timeout (five minutes by default) and then reported a timeout
instead of the pull error. After a minute of the kubelet's own retries,
or at once for an image name that can never resolve, the call now fails
with the kubelet's reason, the way Docker already fails it at pull.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
…ntegers

Postgres returns a SUM over a bigint column as numeric, so the project and
company breakdowns handed the page BigDecimals, which reach it as strings
such as "218.0" where its types promise numbers. The per-user breakdown
and the totals already cast with to_i.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
Claude Code updated itself in the background inside a session container
("Update installed · Restart to update"), so a relaunched CLI no longer ran
the version the image pins. Its settings now set DISABLE_AUTOUPDATER. Codex
gets check_for_update_on_startup = false, which also drops the update prompt
it shows at start. Gemini, Kiro and Grok already had their updaters off;
Cursor's CLI has no documented switch.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
A session's own terminal transitions wake its run (7444633), but only
finish and fail did; a step session stopped by hand left the run waiting.
The V1 execution does not poll, so it sat on that step for up to 23 hours.
Cancellation now signals as well, except while the whole run is being
stopped, which has already told the execution.

TemporalService.send_signal answers { ok: false } rather than raising, so a
failed wake-up was only a log line. One that an open run never received is
now reported to Sentry.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
The tool's command waits for the gate file, and write_file answers false
instead of raising, so an unwritten gate held the call until its whole
timeout. Starting the container now fails at once, which the workflow's
on_failure turns into a failed tool result.

The fake runtime gains fail_write to inject that answer.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
…itten

Neither the clone's credential file nor the credential helper was checked
after writing. A missing credential surfaced as git failing on `cat` of a
file that was not there; a missing helper let the clone succeed and every
later fetch and push fail. Both now fail the clone with the reason, in the
shape the caller's retry and failed_repos bookkeeping already handle, and
install_helper! raises when it cannot place the helper.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
…ywhere

Such a cookie carries only the user id and has no session row for
revoke_all_for! to end: its next request adopted it as a fresh session, and
ActionCable accepted it as it was. The first revocation now marks the user
(users.sessions_revoked_at), and from then on these cookies are refused by
both. Nullable column, no backfill.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
Administrate renders HTML only, so a request for JSON (a scanner, a script
with the wrong Accept header) hit a missing template and ended in a 500.
Such requests now get 406; a template missing for HTML still raises.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
…code host

The picker sends a repository's name, not its visibility, so every
repository added through a GitHub or GitLab connection was stored as
public and listed with the public icon, private ones included. Adding one
now asks the code host, only through a connection the project can see.
The lookup is best effort: when it cannot run, the repository is still
added.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
@artempartos
artempartos merged commit 6ffc0e6 into develop Sep 25, 2026
7 checks passed
artempartos added a commit that referenced this pull request Sep 25, 2026
Rebasing surfaced four things the merge itself could not.

`sign_in_or_prove` ended up defined twice — the second copy, from the
defects commit, still named the model this branch no longer has, and being
last it won. The Google callback's `rescue StandardError` turned the
resulting NameError into a plain "oauth_failed" redirect, so the only visible
symptom was a proof that never appended.

The test helper still called a SessionService method that is gone. A cookie
carrying only a user id is adopted into a session row on first use, but an
adopted row holds no proof and the entry gate reads proofs, so the helper
mints the row itself.

Encryptable changed shape on develop: `encryption_key :name` replaces the
old override. Both of this branch's secrets were also encrypting through the
raw encryptor rather than the concern, which kept them out of
`encrypted_columns` — so `encryption:reencrypt` would have skipped them and a
key rotation would have left them unreadable once the retired key was
dropped. They go through `encrypt_secret`/`decrypt_secret` now, which also
gives them the purpose binding #309 introduced.

Impersonation hygiene is develop's now: impersonating is a sign-in of its own
recording `impersonator_id`, which covers the escalation this branch had
patched by hand. The test moves to that design and gains the case their
model's own comment promises — suspending the operator mid-impersonation
ends their admin access.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
artempartos added a commit that referenced this pull request Sep 25, 2026
Rebasing surfaced four things the merge itself could not.

`sign_in_or_prove` ended up defined twice — the second copy, from the
defects commit, still named the model this branch no longer has, and being
last it won. The Google callback's `rescue StandardError` turned the
resulting NameError into a plain "oauth_failed" redirect, so the only visible
symptom was a proof that never appended.

The test helper still called a SessionService method that is gone. A cookie
carrying only a user id is adopted into a session row on first use, but an
adopted row holds no proof and the entry gate reads proofs, so the helper
mints the row itself.

Encryptable changed shape on develop: `encryption_key :name` replaces the
old override. Both of this branch's secrets were also encrypting through the
raw encryptor rather than the concern, which kept them out of
`encrypted_columns` — so `encryption:reencrypt` would have skipped them and a
key rotation would have left them unreadable once the retired key was
dropped. They go through `encrypt_secret`/`decrypt_secret` now, which also
gives them the purpose binding #309 introduced.

Impersonation hygiene is develop's now: impersonating is a sign-in of its own
recording `impersonator_id`, which covers the escalation this branch had
patched by hand. The test moves to that design and gains the case their
model's own comment promises — suspending the operator mid-impersonation
ends their admin access.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
artempartos added a commit that referenced this pull request Sep 25, 2026
Rebasing surfaced four things the merge itself could not.

`sign_in_or_prove` ended up defined twice — the second copy, from the
defects commit, still named the model this branch no longer has, and being
last it won. The Google callback's `rescue StandardError` turned the
resulting NameError into a plain "oauth_failed" redirect, so the only visible
symptom was a proof that never appended.

The test helper still called a SessionService method that is gone. A cookie
carrying only a user id is adopted into a session row on first use, but an
adopted row holds no proof and the entry gate reads proofs, so the helper
mints the row itself.

Encryptable changed shape on develop: `encryption_key :name` replaces the
old override. Both of this branch's secrets were also encrypting through the
raw encryptor rather than the concern, which kept them out of
`encrypted_columns` — so `encryption:reencrypt` would have skipped them and a
key rotation would have left them unreadable once the retired key was
dropped. They go through `encrypt_secret`/`decrypt_secret` now, which also
gives them the purpose binding #309 introduced.

Impersonation hygiene is develop's now: impersonating is a sign-in of its own
recording `impersonator_id`, which covers the escalation this branch had
patched by hand. The test moves to that design and gains the case their
model's own comment promises — suspending the operator mid-impersonation
ends their admin access.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
artempartos added a commit that referenced this pull request Sep 28, 2026
* docs(auth): add federated identity research, architecture and spec

Market research for broad login coverage, the architecture spine it produced,
the companion RFC, and the BMAD spec kernel.

The research answers why this is built rather than bought: three constraints —
enterprise SSO must work for self-hosted installs, there is no deadline, and no
paid dependency may sit in the login path — eliminate the commercial CIAM market
and the AGPL or self-hosted-paywalled identity providers before any feature
comparison. Keycloak is evaluated on its merits and declined on fit with an app
that already owns its user and organization model.

The spine carries 26 invariants (AD-1..AD-26) with Binds/Prevents/Rule, four
reviewer-gate reports, and an append-only memlog of every decision. Two
questions are left open rather than answered: the sidecar's OSS tenancy, and
IdP-initiated SSO.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* feat(auth): add federated identity, company auth policy and SSO

Six capabilities on one seam: a port with an adapter per authentication method,
so adding a method is an adapter plus a provider row and never a change to the
entry gate.

Foundation. Identity is (provider, subject), never email — the previous
resolution joined on address alone and never read email_verified, which is an
account-takeover path the moment a second provider exists. Sessions become
server-side rows whose proofs append, so revocation works, "sign out everywhere"
is possible, and a user in two companies with disjoint policies is not bounced
between step-ups forever.

Company auth policy. Providers and policy are two tables, because a
deployment-wide Google client and a per-customer SAML connection are not the
same shape. Enforcement is at company entry, re-evaluated every request beside
the membership check, and a mismatch redirects to step-up rather than signing
anyone out. A policy edit that would strand any active member is refused and
names them; deletion is evaluated exactly as disabling.

Methods. Microsoft (Entra), per-company OIDC with PKCE and a server-side nonce,
passkeys, single-use emailed links, and TOTP as a step-up that can never start a
session. Every assertion is bound to the row it claims to satisfy — iss, aud,
nonce, tid, bridge tenant — with no email fallback when binding fails.

SAML never enters this process. A connection row holds the bridge's keys, not
IdP metadata, and an invariant test fails if ruby-saml or omniauth-saml ever
appear in Gemfile.lock: five Critical authentication-bypass advisories in
fifteen months is not a dependency to carry in the web process.

SCIM is a first-party endpoint scoped by its bearer token alone, writing
memberships through the same state machine the UI uses and never writing
identities.

Two adversarial reviews caught four defects a green suite did not: an
impersonation marker that outlived its session and granted admin to whoever
signed in next, password credentials that never reached the identity resolver
and so broke the stranding guard for everyone, a SCIM rename that could repoint
a membership at an unrelated account, and a Microsoft assertion that could adopt
an existing account because Entra proves no domain ownership. All four are fixed
and covered.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* feat(auth)!: drop SAML; enterprise SSO is per-company OIDC

Removes the SAML adapter, the bridge client, the compose profile and their
tests. A spike had verified the bridge first — the OSS build took three
per-company connections with no licence gate, the adapter's client_id shape
worked against the live authorize endpoint, and along the way it showed that the
published compose image name did not resolve at all, that one entityID may serve
only one tenant, and that the bridge phones analytics home unless told not to.

None of that was the deciding factor. Carrying a second service is not worth
what SAML buys, because enterprise SSO does not require it: per-company OIDC is
already implemented and tested, and Entra ID, Okta, Ping, OneLogin, JumpCloud and
Google Workspace all speak it. What is given up is customers whose IT mandates
SAML specifically, or who run ADFS or Shibboleth.

The in-process alternative stays rejected for the reason it always was: ruby-saml
is the only Ruby service provider, and it has had five Critical
authentication-bypass advisories in fifteen months — December 2025's published as
an incomplete fix of March's. A test now bars it and its wrappers from
Gemfile.lock, so adding SAML later is a deliberate decision taken with that
history in view rather than a quiet bundle add.

BREAKING CHANGE: the `sso` compose profile and the SSO_BRIDGE_* settings are
removed. No deployment used them.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* fix(auth): six defects a green suite could not see

Found by running the feature in a browser against a real database. Each belongs
to a class the suite is structurally blind to.

Inertia camelizes prop keys, so every snake_case prop the new pages read came
back undefined: the login screen offered Google on an installation with no
Google credentials and hid passkeys and magic links entirely. Component tests
passed because the test supplied the props, which made them a record of the
author's guess rather than of the contract.

SCIM writes were rejected with "Can't verify CSRF token authenticity". The test
environment disables forgery protection, so request tests were green while a
real directory — which sends a bearer token and no CSRF token — could not
provision anyone. The regression test turns protection back on for that case.

The emailed sign-in link pointed at the wrong port: url_for splits a `host` that
carries one and falls back to the environment default. Invisible in production,
where the domain has no port. Built as a string now, like the OIDC callback.

The SCIM token was passed through a redirect's query string, putting a
credential in browser history, access logs and any Referer. It travels in the
flash.

The step-up code form always failed: setData followed by post sends the previous
state, so a TOTP attempt submitted as a password attempt with an empty password.
The payload is built explicitly and the test now asserts what was posted.

Magic link and passkey sign-ins replaced the live session instead of appending
their proof, unlike the OIDC path — which would have defeated step-up through
either. One shared `sign_in_or_prove` now governs all of them.

Also: deployment providers no longer freeze a humanised label into every
installation's data ("Totp"), the SCIM endpoint is shown before a token exists,
and schema.rb keeps its committed check-constraint rendering.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* fix(auth): offer every accepted method on the step-up screen

The step-up screen named the methods a workspace accepts but only rendered
a control for some of them: `magic_link` had no start path, and `passkey`
has no redirect at all, so both were listed and then unreachable. Someone
whose workspace accepted only those two was told what to do and given no
way to do it.

`magic_link` now starts at `request_magic_link_path`, which fills the
address in from the signed-in user rather than asking for it again, and
the passkey ceremony runs inline on the page.

Also: the sign-in methods page is admin-only in the sidebar, the three
standalone auth screens center their content, and the two settings pages
render inside AuthLayout so they keep the sidebar and page padding.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* fix(mailer): address emailed links the way the browser reaches the app

config/application.rb derives ActionMailer's default_url_options from
Settings.domain and Settings.protocol, so they follow DOMAIN. development.rb
then set them again to a hardcoded host plus the port the process listens on.
Those two ports are the same only when nothing is published in front of the
app: behind a port mapping, a proxy or a container they differ, and every
emailed link points at a port the recipient cannot open. A sign-in link from a
second dev stack led back to the first one.

MagicLinkMailer built its URL as a string to dodge this, and blamed url_for in
a comment. url_for was never at fault — passing a host that carries a port
works fine until a `port:` option overrides it, which is exactly what the
override added. Both mailers now use the ordinary url helpers.

The guard has to read the config files: nothing in a test run exercises the
development environment.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* feat(auth): show a scannable QR when enrolling authentication codes

Enrolment handed over a 32-character base32 secret and left the person to
retype it. The server already built the otpauth:// URI that an authenticator
reads from a QR; nothing rendered it.

Auth::QrCode renders that URI as an SVG data: URI, so the page shows it with
a plain img tag — no QR library in the bundle and no server-built markup
injected into the document. The image carries its own white ground and the
four-module quiet zone the format requires: left transparent it inherits the
page, which on the dark theme is dark-on-dark and unscannable. The typed
secret stays as the fallback for an authenticator with no camera.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* fix(auth): say why company SSO and the emailed link are inactive

Both sit above the email field and both are disabled until it has something,
because both start from the address: SSO resolves the workspace from its
domain, and a link has to be sent somewhere. Google and a passkey need no
address — Google runs its own account picker, a passkey is discoverable — so
they stay active. Nothing on screen said any of that, and a greyed control
with no reason reads as broken.

A line under the group now names the reason while the address is missing, and
narrows itself when the installation offers no emailed link.

The block was also duplicated between the ordinary card and the error card;
it is one SignInMethods component now.

Reconciles docs/design/federated-identity.md with the dropped SAML sidecar:
the scope, goals, identity-binding and Keycloak paragraphs still described a
bridge that no longer exists, and the open-questions table still listed five
questions that are all now answered or withdrawn.

Corrects the callback_url comment, which repeated a wrong diagnosis of
url_for. The reason to build that string by hand is real but different: the
value must match what the customer registered byte for byte and must not vary
with the request, and url_for in a controller takes the host from the incoming
request.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* docs(auth): add a screenshot walkthrough and finish the SAML reconciliation

The RFC now shows the shipped surfaces: signing in, SSO discovery (one
connection, several, none), the emailed link end to end, company auth policy
with an unverified connection, the entry gate before and after, code
enrolment, and the admin-only policy surface refused to a member both ways.
Captured from a running build with the TOTP secret redacted and the secret it
encoded destroyed afterwards.

docs/index.md still described a SAML sidecar in three entries and counted 17
ADs where the spine has 28; the spec still carried an open question about
IdP-initiated SSO that only existed because of SAML. The spine itself was
already coherent — AD-8 and AD-9 are marked retired by AD-28.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* docs(config): document the variables this branch adds

The Settings refactor that landed on develop (#270) brought a guard: every
environment variable a settings file reads must have a row in
docs/reference/configuration.md, and the docs portal must serve that file
rather than a hand-copy. Rebasing onto it surfaced four undocumented
variables from this branch.

AUTH_ENABLED_KINDS is worth reading twice: availability is derived from which
credentials are actually present, so the allowlist can only ever offer less
than that — an installation with no Microsoft credentials never offers
Microsoft however it is set.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* fix(auth): never auto-join a company that refuses the method used

The email domain picks WHICH company someone joins. It never asked WHETHER
that company accepts the method they just signed in with, so a Google sign-in
could plant a membership in a workspace that has Google switched off.

That membership can never be entered — the entry gate re-checks the policy on
every request — and once active it strands its holder, which makes
PolicyUpdater refuse EVERY later policy edit by that company's admins. A
membership nobody can use is worse than no membership: it reads as access,
counts as a member, and quietly freezes the policy screen.

Auth::PolicyResolver.accepts? answers the question with one EXISTS rather than
plucking the whole set to test a single id, and lives beside the rest of the
effective-set arithmetic because that module is declared its only computation.

The test for the freeze goes through IdentityResolver rather than the factory
on purpose: a factory-built user carries a password identity and could never
be stranded, so the first version of it proved nothing.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* chore(routes): regenerate the TypeScript route helpers

Hand-merging this generated file during the rebase dropped a closing brace.
Regenerated from the routes themselves rather than patched.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* fix(auth): finish the move onto develop's server-side sessions

Rebasing surfaced four things the merge itself could not.

`sign_in_or_prove` ended up defined twice — the second copy, from the
defects commit, still named the model this branch no longer has, and being
last it won. The Google callback's `rescue StandardError` turned the
resulting NameError into a plain "oauth_failed" redirect, so the only visible
symptom was a proof that never appended.

The test helper still called a SessionService method that is gone. A cookie
carrying only a user id is adopted into a session row on first use, but an
adopted row holds no proof and the entry gate reads proofs, so the helper
mints the row itself.

Encryptable changed shape on develop: `encryption_key :name` replaces the
old override. Both of this branch's secrets were also encrypting through the
raw encryptor rather than the concern, which kept them out of
`encrypted_columns` — so `encryption:reencrypt` would have skipped them and a
key rotation would have left them unreadable once the retired key was
dropped. They go through `encrypt_secret`/`decrypt_secret` now, which also
gives them the purpose binding #309 introduced.

Impersonation hygiene is develop's now: impersonating is a sign-in of its own
recording `impersonator_id`, which covers the escalation this branch had
patched by hand. The test moves to that design and gains the case their
model's own comment promises — suspending the operator mid-impersonation
ends their admin access.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* chore(db): renumber the proofs migration past a colliding timestamp

The template marketplace (#312) landed a migration at the same timestamp this
branch had used, which aborts `db:migrate` outright. The table it creates
depends only on user_sessions and identity_providers, both far earlier, so the
later slot costs nothing.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* fix(auth): let an admin verify a connection that is not enabled yet

AD-7 wants a company-scoped connection proved before it can be enabled, and
the proof is a completed sign-in through it. Refusing to START a disabled
connection made that impossible: no sign-in until enabled, no enabling until
signed in. Only a platform operator could break the cycle, so a company admin
could never set up their own SSO — while the screen told them to "sign in
through it once, then enable it here".

An admin of the owning company may now start one that is still switched off.
It stays a verification rather than a way in: the company does not accept the
method, so the entry gate turns the resulting session away exactly as before,
and the connection still cannot be enabled until the sign-in actually
completed. The screen gains the Verify button that starts it, and the toggle
is held shut until it has.

Found by deploying to staging. Both guards were individually tested and green
— "a disabled connection cannot be started" asserts the refusal as correct,
and the enable guard seeds the identity directly. Only the pair deadlocks,
which no unit of either could see.

Also corrects three documents that still promised one forced global
re-authentication at the cutover. That followed from this feature owning the
session record; it no longer does, so live sessions survive and the cutover
costs one step-up instead.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* fix(auth): verify a connection through a real form, not an Inertia visit

Verifying redirects to the customer's identity provider, and an Inertia
`router.post` is an XHR: the browser refuses to follow a cross-origin redirect
from one, reports it as CORS, and the page simply sits there. The server was
right all along — the authorize URL was built with PKCE and returned as a 302 —
so no request test could see it. GoogleLoginButton is a form for exactly this
reason; the Verify button now is too.

Still POST with a CSRF token rather than a link: a GET start can be triggered
on a victim's session from an external page (CVE-2015-9284).

The page gains the tests that express the difference a request test cannot —
that Verify submits a form at the start path carrying an authenticity token,
that an unverified connection holds its switch shut, that Verify disappears
once proved, and that a member sees neither Verify nor Remove.

Found on staging within minutes of deploying the fix it belongs to.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* fix(scim): route the paths a real directory actually calls

SCIM fixes its collection at "/Users", capital U, and Scimitar advertises
it that way in ResourceTypes. Rails routing is case-sensitive, so the
`resources :users` draw answered "/scim/users" and returned 404 for the
only spelling Entra or Okta ever sends — the feature could not have
worked against a live provider.

The same draw pointed PUT at Scimitar's #update, which expects a PATCH
"Operations" body, so a provider's replace would have been parsed as a
patch. PUT now reaches #replace.

Neither fault was visible to the request tests: they chose their own
URLs, and lowercase happened to be the one they chose. The added routing
assertions pin the canonical spellings, and the round-trip test follows
the Location header of a created member back to a fetch.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* feat(scim): throttle the directory endpoint before publishing it

On a deployment that exposes /scim to the internet, one bearer token is
everything standing between a stranger and a company's membership list,
and nothing else about the request identifies the caller.

Two throttles: per credential, generous enough for a real directory's
reconciliation sweep, and per IP, which caps guessing at a rate no
attacker can use. The cache key is a digest, so a throttle bucket never
holds a live credential.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* docs(auth): publish the sign-in and SSO guides under /docs

Two pages: one for a workspace admin — what the methods are, how a
workspace decides which it accepts, connecting an OIDC provider, the
verify-before-enable step, step-up, directory sync — and one for whoever
runs the installation, covering the credentials each provider needs and
why availability is derived from them rather than declared.

Registered in all five places a /docs page has to appear, including the
Ruby slug list in Web::DocsController that is the easy one to miss.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* style(docs): order the new doc imports alphabetically

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* feat(auth): keep live sessions signed in through the cutover

The policy gate answers "which method backs this session" from
user_session_proofs. Sessions that predate that table have no proof, so
every one of them would be sent to step-up on the first request after
deploy — not because a company's policy changed, but because
user_sessions records no method and the question is new.

Where the answer is unambiguous it is recovered instead of asked for: a
user holding exactly one identity provider authenticated through that
one, because there was nothing else to authenticate through. A user
holding several is skipped, since choosing between them would be
inventing the proof rather than recovering it, and step-up is the right
outcome there.

The proof is dated from the session's own creation, not from the
deploy — that is when the person actually authenticated.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* test(auth): build the cutover fixtures from how identities actually appear

Setting a password creates its identity (User#link_password_identity),
so a plain factory user already holds one provider. The tests were
written as if it held none, which inverted every expectation: the
"no identity" case was proved and the single-provider cases were skipped
as ambiguous.

The shapes now mirror the ones a deployment actually has after the
backfill — a password user, a Google-only user, and the two edges the
migration refuses to guess at.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* fix(scim): name the SCIM routes instead of letting Rails derive them

Left unnamed, Rails takes the name from the literal path segment: the
collection became `scim_Users` — capital and all, which then reaches the
frontend as `scimUsersPath` — and the next route on the same path fell
back to a bare `scim` that requires an `:id`, reading as the engine root
rather than a member.

The paths themselves are unchanged; only their names are. Nothing in the
frontend referenced the derived helpers, since SCIM is machine-facing.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* fix(auth): let SSO discovery actually reach the provider

Resolving an address to its company's single connection answered with a
303 to /auth/oidc/:id/start. That route is POST only — deliberately, so
a GET cannot be triggered on a victim's session (CVE-2015-9284) — and a
redirect is followed with GET, so the browser landed on a routing error
instead of signing in. Every workspace with exactly one connection had
no working "Sign in with your company SSO".

Discovery now begins the authorization itself, sharing the redirect with
#start so the two ways of reaching a connection cannot drift. It is
already the person's own POST with their CSRF token, so the second hop
added nothing.

The test asserted the redirect TARGET was oidc_start_path, which is
precisely what was broken — it never asked whether a browser could
follow it. It now checks that discovery leaves for the provider, and a
second test pins that it never again answers with one of our own paths.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* refactor(settings): move sign-in methods into company settings as Access (#337)

* refactor(settings): move sign-in methods into company settings as Access

They read as settings and were reached from a separate sidebar entry, so
the screen is now the Access tab of company settings: which methods the
workspace accepts, its own OIDC connection, its directory sync, and who
may join without an invitation.

Each tab is its own URL rather than a client-side panel swap, because
the two halves save differently — General is one form behind one Save,
Access applies every control on the spot. A tab that is also a route
keeps that honest and stays linkable.

Domain auto-join moves with it: it answers the same question as
everything around it. It is saved on the spot too, since a lone Save
button for one switch would be the only control on the tab that behaved
differently, and settings#update now returns to the tab the edit came
from. General no longer carries autoAcceptUsers at all — resending a
stale copy from there would have quietly undone a change made here.

The list is now reachable by members, read-only: knowing which methods a
workspace accepts is how someone makes sense of a step-up prompt.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* fix(settings): follow the moved Access page from every caller

Removing the auth_policies index route removed company_auth_policies_path
with it, and three controllers still redirected there: adding, updating
and removing an OIDC connection, both SCIM token actions, and the return
from verifying a connection. Rails only raises on the call, so the page
itself looked fine.

The two settings tests that covered the Joining card move to where the
card now lives. What replaces them on the general tab asserts the
absence: a second control for the same field would fight the one on
Access, and this page's deferred Save would send a stale copy over it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

---------

Signed-off-by: Artem Petrov <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>

* refactor(auth): draw every sign-in method with one component (#339)

The five methods were built by three components with five different
recipes: two at size lg and three at the default, two with variant
subtle so they carried no border at all, and MicrosoftLoginButton
applying `classes.googleButton` from a stylesheet that never defined it
— so it silently got none of Google's styling and fell back to the
browser font. Only two methods had an icon, so their labels started at
four different x positions.

AuthMethodButton fixes the shape once: one height, one border, and a
fixed icon column held even where a method has no icon, which is what
puts every label on the same x. Google and Microsoft were byte-identical
apart from an icon, a path and a label, and are now exactly that.

Credentials move above the methods. Two of them wait on the address, and
the field they wait on used to sit below them — the hint said "enter it
below", pointing past the controls it excused.

Also collapses the login card: `error ? <Paper>…</Paper> :
<Paper>…</Paper>` held two byte-identical branches of ~85 lines each.

Signed-off-by: Artem Petrov <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>

* feat(auth): ask for the address first, then offer what the workspace takes (#341)

* feat(auth): ask for the address first, then offer what the workspace takes

The login screen offered every method at once and greyed out the two
that need an address — with the field they need sitting below them. Now
it asks for the address, and what comes back is decided by its domain:
a workspace that signs in through a provider goes straight there, one
that does not gets a second step drawn from exactly the methods it
accepts. Nothing that cannot complete is ever offered.

Decided by the DOMAIN, never by whether an account exists. An unknown
address at a known domain answers identically to a known one, or the
screen becomes an oracle for which addresses are registered — there is a
test that compares the two responses field by field.

Authentication codes are excluded at the service: six digits confirm a
session that already exists, and there is nobody to look up from them.

/login/sso becomes /login/identify. Its "this domain has no SSO" branch
stops being the error `no_sso_connection` and becomes the ordinary
second step, which is what it is for most domains.

Validation splits with the screen: the address is settled on step one
and is not editable on step two, so a complaint about it there would
have had nowhere to appear.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* fix(auth): keep a refused password on the step it was typed on

Signing in is two screens now, and two things still assumed one.

The system-test page object filled an address and a password together;
the password box only exists on the second screen, so every system test
that signs in died on it. It walks both steps now, and waits for the
second to arrive rather than reaching for a field the server has not
sent yet.

And a refused password redirected to /login — which is the ADDRESS step,
so a typo cost you the address you had already given. It re-renders the
credentials step instead, with the workspace's methods and the refusal
on it. An address no workspace claims still goes back to the start;
there is no step two to return to.

The render moves to a concern, since #identify and #create both reach it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* test(auth): assert the refusal, not the redirect it used to be

A soft-deleted account is still refused at login; it now stays on the
credentials step with the message instead of redirecting, like any other
refusal. The test pinned the redirect, which was the transport rather
than the behaviour.

What it was there for is untouched and still asserted: no session comes
out of it, so the account is refused AT LOGIN rather than signed in and
then dropped by current_user's not_deleted scope.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

---------

Signed-off-by: Artem Petrov <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>

---------

Signed-off-by: Artem Petrov <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
artempartos added a commit that referenced this pull request Sep 28, 2026
GitHub opens a check suite for every installed app with the checks
permission. An app that never reports a run (Railway on
collectively-app) leaves its suite queued with zero runs forever, and
since #309 routed the check_suite webhook through the reconciliation
probe, every github_checks_completed gate on such a repo waited on it
until its TTL marked it stale. No gate in project 27 has resolved since
the 2026-09-25 deploy.

Empty queued suites are now set aside while another suite has runs. A
PR whose suites are all still empty reads as in_progress, because that
is also what a fresh push looks like for a few seconds.

Signed-off-by: Artem Petrov <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
artempartos added a commit that referenced this pull request Oct 1, 2026
…#372)

* fix(repositories): clone every branch and authenticate gh in sessions

A session checkout was a --depth=1 single-branch clone, so `git branch -r`
listed only the source branch and no agent could find or diff work already
in flight on another branch without re-deriving a refspec and an unshallow
by hand. Workflows that pick up an existing feature branch reported "no
match" and failed. The clone is now blobless instead: every branch and the
full commit history at about a shallow clone's size, with skipped blobs
fetched on demand through the credential helper. Azure and anonymous public
clones keep their shallow clone.

Since #309 no token sits in the remote URL, which was the only place gh and
REST calls found one, so `gh pr list`, `gh pr create` and the merges API
stopped working in every session. A gh wrapper ahead of the real one on
PATH now asks the same credential helper per call for the repository the
call targets, and hands the token to that gh process only.

The clone exec also gets an explicit timeout: the Kubernetes exec default
of 30 s is shorter than a large repository takes to clone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

* fix(azure-devops): clone session repositories blobless too

Azure DevOps Services has served blobless partial clones since November
2023, and the platform only talks to the cloud service (api_host), never to
an on-prem Azure DevOps Server that might not. So Azure checkouts get every
branch and the full history on the same terms as GitHub and GitLab, with
skipped blobs fetched through the existing Azure credential helper.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>

---------

Signed-off-by: Artem Petrov <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
artempartos added a commit that referenced this pull request Nov 2, 2026
…631)

A custom stdio connector added before packages had to be pinned (#309)
keeps running, because MCPServer only checks the launch line when it is
written. The exporter carried such a row into the package as it was,
the validator passed it, and every install then failed on the last step
with "Command must pin … to an exact version".

The validator now applies MCPServer's own launch-line rules to every
custom stdio server, so the export stops and names the connector to pin,
and catalog sync and install refuse the package up front. A line that
takes an install input is left to the install, where it is complete.

Signed-off-by: Artem Petrov <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
aixle-com Bot pushed a commit that referenced this pull request Dec 1, 2026
…309) (#960)

* feat(runners): a coder runner created from the console (runners 17d, #309)

Adds Adapters::Coder and its seam to the Coder services, registers coder (not
creatable until 17e), the minutely reconciler for platform-made environments,
and the integration removal rules for deleted runners.

Signed-off-by: Alex <[email protected]>

* test(runners): resolve the Coder host publicly in the coder runner tests

Signed-off-by: Alex <[email protected]>

* test(runners): fix the fake Coder's workspace list

Signed-off-by: Alex <[email protected]>

* fix(runners): retry the longest-waiting teardown first

Signed-off-by: Alex <[email protected]>

* fix(runners): do not shadow the install step of Provisioned

Signed-off-by: Alex <[email protected]>

* test(runners): answer the ops of a coder runner's environments

Signed-off-by: Alex <[email protected]>

* test(runners): a deleted runner no longer keeps its integration

Signed-off-by: Alex <[email protected]>

* docs(runners): note what 17d built; keep the fake Coder lint-clean

Signed-off-by: Alex <[email protected]>

* Test: sweep of gone environments after the integration was removed

Signed-off-by: Alex <[email protected]>

* Skip gone environments of runners with no integration in the reconciler sweep

Signed-off-by: Alex <[email protected]>

* Refuse integration removal while a deleted runner's environment has a hold; name the health and integration writes on Runner

Signed-off-by: Alex <[email protected]>

* Test: the removal test releases the environment's hold before it expects the removal

Signed-off-by: Alex <[email protected]>

---------

Signed-off-by: Alex <[email protected]>
Co-authored-by: Alex <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant