Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
3284a6c
Bound delegated Workspace grants and Directory reads
zlareb1 Nov 18, 2026
d37d3fb
Require a subject for delegated token grants
zlareb1 Nov 18, 2026
67b5c35
Preserve delegated Directory quota failures
zlareb1 Nov 18, 2026
a7069c1
Prepare bounded crawl source observations
zlareb1 Nov 18, 2026
21cfada
Keep the crawl row fixture in canonical source form
zlareb1 Nov 18, 2026
a7fa6d5
Fence durable crawl exclusions through cleanup and repair
zlareb1 Nov 18, 2026
9f02606
Retain source approval as checked authorization metadata
zlareb1 Nov 18, 2026
3f1d580
Bind delegated crawl tokens to retained source authority
zlareb1 Nov 18, 2026
b9bc571
Require explicit denial of every crawl write scope
zlareb1 Nov 18, 2026
7daf0f8
Observe complete bounded crawl unions before publishing
zlareb1 Nov 18, 2026
aae036d
Reseal crawl refusal keys without changing their identity
zlareb1 Nov 18, 2026
ca5fcd3
Generate crawl control settings references
zlareb1 Nov 18, 2026
b9aa2c5
Pin complete crawl control and membership row builders
zlareb1 Nov 18, 2026
4b1aa7f
Prepare verified person capture and historical crawl ACL redaction
zlareb1 Nov 18, 2026
88c0c8c
Redact exact person references from crawl controls and membership his…
zlareb1 Nov 18, 2026
3eead92
Prepare stable Workspace identity before canonical person deletion
zlareb1 Nov 18, 2026
497922b
Fence canonical person cleanup through raw capsule erasure
zlareb1 Nov 18, 2026
916437c
Generate bounded crawl person cleanup configuration
zlareb1 Nov 18, 2026
9d86c73
Erase verified person aliases from historical crawl approvals
zlareb1 Nov 18, 2026
5c9b445
Refuse unknown restrictions in retained crawl approval metadata
zlareb1 Nov 18, 2026
6b5da35
Bind delegated crawl registration and indexed reads to completed sour…
zlareb1 Nov 18, 2026
484eb1f
Preserve crawl person refusals across readmission rotation and restore
zlareb1 Nov 18, 2026
e316c02
Cover crawl registry loss and worker retry boundaries
zlareb1 Nov 18, 2026
54760e5
Preserve crawl refusal and sync retry proofs
zlareb1 Nov 18, 2026
01e6f2c
Pin delegated crawl control defaults
zlareb1 Nov 18, 2026
4151bef
Format delegated crawl storage rows
zlareb1 Nov 18, 2026
f095513
Generate crawl source companions on an isolated hosted runner
zlareb1 Nov 18, 2026
3b6e739
Adopt canonical crawl companions and classify capsule resealing
zlareb1 Nov 18, 2026
500f8b4
Align crawl fixtures with live authorization and schema contracts
zlareb1 Nov 18, 2026
9dee829
fix: preserve crawl deadlines and lifecycle fixture contracts
zlareb1 Nov 18, 2026
8c4a61b
test: model canonical person cleanup and verified token metadata
zlareb1 Nov 18, 2026
192f3a8
test: cover crawl restore and historical approval resealing
zlareb1 Nov 18, 2026
04a2d3f
Prevent source resealing from reviving erased metadata
zlareb1 Nov 18, 2026
353be99
Keep uncertain metadata writes fenced until claim expiry
zlareb1 Nov 18, 2026
6a0fed9
Crawl test claims retain settlement and distinguish completed cleanup
zlareb1 Nov 18, 2026
4296e41
Test native crawl publication through authenticated HTTP
zlareb1 Nov 18, 2026
8e7e7a5
Use account sessions in the native crawl witness
zlareb1 Nov 18, 2026
b7d9a85
Use valid collections in the native crawl witness
zlareb1 Nov 19, 2026
e5ca7a8
Use the next migration number for workspace crawls
zlareb1 Nov 20, 2026
55a5fa9
Match the crawl migration journal filename
zlareb1 Nov 20, 2026
a234cf8
Compose workspace crawls with current main
zlareb1 Nov 20, 2026
ff0645b
Compose workspace crawls with the latest main fixes
zlareb1 Nov 20, 2026
4e35400
Require the crawl migration across the serving fleet
zlareb1 Nov 20, 2026
113d808
Crawl fixtures advertise the required schema migration
zlareb1 Nov 20, 2026
c748697
Classify the crawl erasure column update in the SQL census
zlareb1 Nov 21, 2026
85cb15d
Classify source ciphertext column updates
zlareb1 Nov 21, 2026
dbdf668
Classify the crawl approval reseal statement in the SQL census
zlareb1 Nov 21, 2026
079d4b3
Describe retired source rows after selector erasure
zlareb1 Nov 21, 2026
6531c31
Crawl readers present the private-session opt-in
zlareb1 Dec 1, 2026
e8c85fb
Merge main: renumber the crawl migration and fix the reader fixtures
zlareb1 Dec 1, 2026
9a20b57
Crawl admission waits for migration 119
zlareb1 Dec 1, 2026
89f7620
A crawl turn checks each person once and skips unavailable group members
zlareb1 Dec 1, 2026
9649049
A crawl turn survives an edit during its union, and its updates are a…
zlareb1 Dec 1, 2026
7fef9f9
A SCIM deletion fences only its own orgs' crawls, and nothing before …
zlareb1 Dec 1, 2026
e62883a
A failed SCIM capture can be retried, and an uncaptured deletion fenc…
zlareb1 Dec 1, 2026
49048ba
A SCIM deletion's crawl capture cannot wedge, and DELETE deactivates …
zlareb1 Dec 1, 2026
166435b
Crawl person cleanup is keyed by email, so a skipped workspace cannot…
zlareb1 Dec 1, 2026
ca14120
Crawls leave a deactivated person out each turn, with no erasure fence
zlareb1 Dec 1, 2026
c209b3c
Crawl ops refuse an unreadable SCIM read as retryable, and the docs s…
zlareb1 Dec 1, 2026
6ba4971
Merge main: regenerate the SDKs over main's wire changes
zlareb1 Dec 1, 2026
9ee8cc4
A suspended selected person is left out, and SCIM outages answer retr…
zlareb1 Dec 1, 2026
d989b14
Crawl remove and sync refuse a non-admin or a SCIM outage without a s…
zlareb1 Dec 1, 2026
3cd2fae
Clear a retired crawl's selection and re-read grants once per listing
zlareb1 Dec 1, 2026
1fb6bc4
Bound only the crawl's file listing, and keep grant caches on reads
zlareb1 Dec 1, 2026
3cd15ee
Crawl registration re-reads grants only at its permit and commit
zlareb1 Dec 1, 2026
a39f7fb
Directory addresses compare in one case, and the crawl texts name it
zlareb1 Dec 1, 2026
e941003
A crawl provider outage answers retryably, and rotate and update prov…
zlareb1 Dec 1, 2026
bdb7868
Every knowledge-source request with no answer raises Unreachable
zlareb1 Dec 1, 2026
a4ffae8
Network failures are pinned as Unreachable in every shared client path
zlareb1 Dec 1, 2026
926a1be
scim.deactivated reads through the batched SCIM statement
zlareb1 Dec 1, 2026
8de8778
A batched SCIM read sends at most a thousand ids per statement
zlareb1 Dec 1, 2026
e92def1
Tests pin where a batched SCIM read stops
zlareb1 Dec 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions .github/workflows/crawl-native-privacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Crawl native privacy

on:
pull_request:
paths:
- "server/**"
- "schemas/migrations/**"
- "pyproject.toml"
- "uv.lock"
- "tests/integration/crawl_native_privacy.py"
- ".github/workflows/crawl-native-privacy.yml"
push:
branches: [main]
paths:
- "server/**"
- "schemas/migrations/**"
- "pyproject.toml"
- "uv.lock"
- "tests/integration/crawl_native_privacy.py"
- ".github/workflows/crawl-native-privacy.yml"

permissions:
contents: read

jobs:
crawl-native-privacy:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
LOOM_ENV_FILE: ""
LOOM_CH_CONTAINER: docsrc-crawl-${{ github.run_id }}-${{ github.run_attempt }}
LOOM_CH_HOST: 127.0.0.1
LOOM_CH_PORT: "18123"
LOOM_CH_HOST_PORT: "18123"
LOOM_CH_NATIVE_HOST_PORT: "19000"
LOOM_CH_USER: loom
LOOM_CH_PASSWORD: loomdev
LOOM_CH_DATABASE: loom
LOOM_DEPLOYMENT: "1"
LOOM_INSTANCE_LABEL: ci-crawl-${{ github.run_id }}-${{ github.run_attempt }}
LOOM_BUILD_COMMIT: ${{ github.sha }}
LOOM_AUTH_REQUIRED: "true"
LOOM_STORAGE_AUTHORITY: clickhouse
LOOM_WORKERS_PROCESS: inline
LOOM_BACKGROUND_WORKERS: auto
LOOM_EMBEDDING_MODEL: fake-ngram-1024
LOOM_LLM_PROVIDER: fake
LOOM_KNOWLEDGE_MIRRORED_SOURCES_ENABLED: "true"
LOOM_KNOWLEDGE_SOURCE_SYNC_ENABLED: "true"
LOOM_KNOWLEDGE_SOURCE_SYNC_INTERVAL_SECONDS: "60"
LOOM_KNOWLEDGE_SOURCE_SYNC_IDLE_INTERVAL_SECONDS: "60"
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
- name: Install locked dependencies and build dashboard assets
run: |
uv sync --locked --python 3.12 --extra dev --extra code
npm --prefix frontend ci
npm --prefix frontend run build
- name: Configure the test signer
run: |
crawl_signer_material="$(openssl rand -hex 32)"
printf '::add-mask::%s\n' "$crawl_signer_material"
printf 'LOOM_JWT_SECRET=%s\n' "$crawl_signer_material" >> "$GITHUB_ENV"
- name: Start the owned backend
id: clickhouse
run: |
if docker container inspect "$LOOM_CH_CONTAINER" >/dev/null 2>&1; then
echo "refusing an existing backend container" >&2
exit 1
fi
LOOM_CLICKHOUSE_IMAGE="$(bash dev/clickhouse_release.sh)"
export LOOM_CLICKHOUSE_IMAGE
echo "admitted=true" >> "$GITHUB_OUTPUT"
bash dev/ci_start_clickhouse.sh
- name: Run the native privacy witness
run: >-
.venv/bin/python -m pytest tests/integration/crawl_native_privacy.py
-q --tb=short --junitxml=crawl-native-privacy.xml
- name: Preserve backend diagnostics
if: always() && steps.clickhouse.outputs.admitted == 'true'
run: docker logs "$LOOM_CH_CONTAINER" > crawl-native-clickhouse.log 2>&1
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: crawl-native-privacy
path: |
crawl-native-privacy.xml
crawl-native-clickhouse.log
if-no-files-found: ignore
- name: Remove the owned backend
if: always() && steps.clickhouse.outputs.admitted == 'true'
run: docker rm -f "$LOOM_CH_CONTAINER"
23 changes: 16 additions & 7 deletions dev/restore_connected_accounts.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
"""End connected-account authority after restoring the configured deployment.
"""End connected-account and crawl-source authority after restoring the configured
deployment.

Stop all serving processes and workers first. This command does not erase mirror
contents; complete the deployment's mirror cleanup before serving again.
Expand All @@ -17,32 +18,40 @@
from server.cli._apply import add_apply_flags
from server.cli._ch import reads, run_connected, writes
from server.knowledge.app.connected_restore import restore_all
from server.knowledge.app.crawl_restore import restore_all as restore_crawls


def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser(description=__doc__)
add_apply_flags(parser, writes="stop and purge this deployment's connected accounts")
add_apply_flags(
parser, writes="stop and purge this deployment's connected accounts and crawl sources"
)
args = parser.parse_args(argv)

async def run(ch: Any) -> int:
await restore_all(apply=not args.dry_run, ch=ch)
await restore_crawls(apply=not args.dry_run, ch=ch)
print(
"connected-account restore cleanup completed; connections must be established again"
(
"connected-account and crawl restore cleanup completed; connections and "
"crawl sources must be registered again"
)
if not args.dry_run
else "dry run: no connection authority was changed"
else "dry run: no connection or crawl authority was changed"
)
return 0

gate = (
reads("plans this deployment's connection restore cleanup")
reads("plans this deployment's connection and crawl restore cleanup")
if args.dry_run
else writes("purges this deployment's restored connection authority")
else writes("purges this deployment's restored connection and crawl authority")
)
try:
return run_connected(run, org_free=gate)
except Exception: # noqa: BLE001 — maintenance errors must not print credentials or stored metadata
print(
"connected-account restore cleanup failed; keep the deployment stopped", file=sys.stderr
"connected-account or crawl restore cleanup failed; keep the deployment stopped",
file=sys.stderr,
)
return 1

Expand Down
13 changes: 13 additions & 0 deletions docs/architecture/clickhouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,19 @@ with `purge=true`, stale vector caches, runner state, and the supersession rows
refused because an erasure removed the document it was built from deletes the chunk
rows it inserted (lightweight `DELETE FROM loom.chunks` by source and version,
`chunks.delete_versions`), so its text and author do not outlive the erasure.
- **Crawl approval resealing** conditionally updates only the matching old
`approval_enc` for an exact org, namespace and source id, under the source lease. It
rewrites raw versions and checks for old-ciphertext residue before the previous root
is retired.
- **Crawl restore invalidation** clears `active`, `approval_enc` and `crawl_generation`
on every raw crawl version of an org after an offline restore, then checks for
residue, so no restored version reactivates delegated source authority.
- **Source registry publishers** bound every INSERT under the source lease by its
claim's receiver deadline. An unanswered send retains its Keeper key until expiry; the
receiver's latest possible completion precedes that expiry. Nested claims retain the
earliest deadline and every unanswered send, so a later holder cannot rewrite raw
history while an older send may still append to it. An insufficient claim window
refuses before publishing.
- **Remaining `ALTER … UPDATE/DELETE` call sites** are listed in
`tests/unit/test_clickhouse_mutation_inventory.py`, which fails on a new one until it is
classified there.
Expand Down
Loading
Loading