Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .silo-translations
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
platform=web
version=2026.12.05-1ec18ef
sha256=907ce3bb89e3796f0ea73c1330779ef1ace2a63dc018b24bad57d68a7bfcbe5b
version=local-7dd4abec5656

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major · Data Integrity & Integration · Quick win

Sync a released catalog with the translations.

The default scripts/sync-translations rejects this local-* pin. All 38 real non-English locale files also lack the 22 new direct-network keys, so those labels fall back to English. Complete the catalog translation pass and sync its release before merging.

As per coding guidelines, “Every piece of text a user can see ships with its catalog entry and translations.”

Source: Coding guidelines

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected at this stage. The strings are in Silo-Server/silo-translations#226, which merges first after its translation pass. Before this pull request merges, the branch re-syncs with scripts/sync-translations --version <release>, which pins the release and brings in the other locales. The description says the same under Translations.

🤖 Claude Code (claude-opus-5-5)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@darthShadow Thanks for clarifying the translation plan. The released pin and translated locale files still need verification before merge. I’ll leave the finding for that check.


Learnings used

Learnt from: Quick104
Repo: Silo-Server/silo-server PR: 5311
File: .silo-translations:0-0
Timestamp: 2026-11-25T19:37:26.525Z
Learning: Within repository "Silo-Server/silo-server", only for files matching one of [".silo-translations"]: For the feat/silo-sync feature, the maintainer confirmed that PRs into the integration branch may use a --local translation catalog sync while the feature's interface keys are collected into one catalog change and translation pass. Do not require a published catalog pin in each integration-branch PR. Before the integration-branch PR into main opens, sync with --version <release> and commit the published pin in .silo-translations and the regenerated files.
Learnt from: Quick104
Repo: Silo-Server/silo-server PR: 5320
File: .silo-translations:2-3
Timestamp: 2026-11-25T19:41:55.534Z
Learning: Within repository "Silo-Server/silo-server", only for files matching one of [".silo-translations"]: For the feature PRs targeting `feat/silo-sync`, the maintainer approved collecting the feature's interface keys in one `silo-translations` catalog change and translation pass. Those PRs may use a `--local` sync and a local pin in `.silo-translations` until the catalog release exists. Verify the published pin and regenerated files on the PR from `feat/silo-sync` into `main`.

You are interacting with an AI system.

sha256=-
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "https://siloserver.org/docs/api/v2/problems/invalid_cursor",
"title": "Invalid cursor",
"status": 400,
"detail": "The cursor is malformed, tampered with, or belongs to a different query.",
"instance": "urn:silo:request:00000000000000000000033b"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,9 @@
"local_port": 8094,
"connected_at": "2026-01-02T03:04:05.678Z"
}
]
],
"page": {
"has_more": false
},
"total": 1
}
40 changes: 40 additions & 0 deletions contracts/api/v2/fixtures/admin_direct_connections_peers_page.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"items": [
{
"host": {
"id": "api",
"role": "api",
"name": "API"
},
"user_id": "7",
"username": "account-7",
"device_id": "device-phone",
"class": "direct",
"address_family": "ipv4",
"peer_endpoint": "127.0.0.1:41641",
"local_port": 8094,
"connected_at": "2026-01-02T03:04:05.678Z"
},
{
"host": {
"id": "api",
"role": "api",
"name": "API"
},
"user_id": "7",
"username": "account-7",
"device_id": "device-tv",
"device_name": "tv-7",
"class": "direct",
"address_family": "ipv4",
"peer_endpoint": "127.0.0.1:41641",
"local_port": 8094,
"connected_at": "2026-01-02T03:04:05.678Z"
}
],
"page": {
"next_cursor": "eyJ2IjoxLCJwIjp7InUiOjcsImQiOiJkZXZpY2UtdHYifX0.CYBEXHtdkBAcLjIeWNmRks5PDBi6O-n5hr_4pVuDvUA",
"has_more": true
},
"total": 5
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"items": [
{
"host": {
"id": "api",
"role": "api",
"name": "API"
},
"user_id": "9",
"username": "account-9",
"device_id": "device-zz",
"class": "direct",
"address_family": "ipv4",
"peer_endpoint": "127.0.0.1:41641",
"local_port": 8094,
"connected_at": "2026-01-02T03:04:05.678Z"
}
],
"page": {
"has_more": false
},
"total": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"enabled": true,
"hosts": [
{
"host": {
"id": "api",
"role": "api",
"name": "API"
},
"checked_at": "2026-01-02T03:04:05.678Z",
"features": [
{
"feature": "direct",
"kind": "local",
"state": "off",
"reason": "disabled"
}
],
"knobs": [],
"endpoint_candidates": {
"items": [
{
"endpoint": "127.0.0.1:51820",
"source": "announced"
},
{
"endpoint": "127.0.0.2:41641",
"source": "stun"
},
{
"endpoint": "127.0.0.3:41641",
"source": "local"
}
]
}
}
]
}
81 changes: 81 additions & 0 deletions contracts/api/v2/fixtures/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,27 @@
"schema": "#/components/schemas/CollectionAdminDeviceMetadata",
"body_file": "admin_devices.json"
},
{
"name": "admin_direct_connections_peers_invalid_cursor",
"operation_id": "listAdminDirectConnectionPeers",
"scenario": "A cursor that was not minted for this query is refused as invalid.",
"request": {
"method": "GET",
"path": "/api/v2/admin/direct-connections/peers?cursor=not-a-cursor",
"headers": {
"Authorization": "Bearer tok-admin",
"X-Profile-Id": "p-primary"
}
},
"expected_status": 400,
"response_headers": {
"Cache-Control": "no-store",
"Content-Type": "application/problem+json"
},
"response_media_type": "application/problem+json",
"schema": "#/components/schemas/Problem",
"body_file": "admin_direct_connections_peers_invalid_cursor.json"
},
{
"name": "admin_direct_connections_peers_ok",
"operation_id": "listAdminDirectConnectionPeers",
Expand All @@ -1362,6 +1383,66 @@
"schema": "#/components/schemas/DirectConnectionPeerCollection",
"body_file": "admin_direct_connections_peers_ok.json"
},
{
"name": "admin_direct_connections_peers_page",
"operation_id": "listAdminDirectConnectionPeers",
"scenario": "The first page of the devices that have a direct path to the API host, ordered by account and device, with the count of all of them and a cursor for the next page.",
"request": {
"method": "GET",
"path": "/api/v2/admin/direct-connections/peers?limit=2",
"headers": {
"Authorization": "Bearer tok-admin",
"X-Profile-Id": "p-primary"
}
},
"expected_status": 200,
"response_headers": {
"Content-Type": "application/json"
},
"response_media_type": "application/json",
"schema": "#/components/schemas/DirectConnectionPeerCollection",
"body_file": "admin_direct_connections_peers_page.json"
},
{
"name": "admin_direct_connections_peers_search",
"operation_id": "listAdminDirectConnectionPeers",
"scenario": "A search over the account's name, the device's name and the device ID: one match, and a total that counts only the matches.",
"request": {
"method": "GET",
"path": "/api/v2/admin/direct-connections/peers?q=zz",
"headers": {
"Authorization": "Bearer tok-admin",
"X-Profile-Id": "p-primary"
}
},
"expected_status": 200,
"response_headers": {
"Content-Type": "application/json"
},
"response_media_type": "application/json",
"schema": "#/components/schemas/DirectConnectionPeerCollection",
"body_file": "admin_direct_connections_peers_search.json"
},
{
"name": "admin_direct_connections_status_endpoint_candidates",
"operation_id": "getAdminDirectConnectionsStatus",
"scenario": "An acting administrator reads the API host's readiness while direct connections are on and the engine has reported its addresses: each address with the source that found it.",
"request": {
"method": "GET",
"path": "/api/v2/admin/direct-connections/status",
"headers": {
"Authorization": "Bearer tok-admin",
"X-Profile-Id": "p-primary"
}
},
"expected_status": 200,
"response_headers": {
"Content-Type": "application/json"
},
"response_media_type": "application/json",
"schema": "#/components/schemas/DirectConnectionsStatus",
"body_file": "admin_direct_connections_status_endpoint_candidates.json"
},
{
"name": "admin_direct_connections_status_ok",
"operation_id": "getAdminDirectConnectionsStatus",
Expand Down
98 changes: 96 additions & 2 deletions contracts/api/v2/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -38941,10 +38941,21 @@
"$ref": "#/components/schemas/DirectConnectionPeer"
},
"type": "array"
},
"page": {
"$ref": "#/components/schemas/PageInfo"
},
"total": {
"description": "Separate live count; not a snapshot of the page.",
"format": "int64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"items"
"items",
"page",
"total"
],
"type": "object"
},
Expand Down Expand Up @@ -39122,6 +39133,47 @@
],
"type": "object"
},
"DirectConnectionsEndpointCandidate": {
"additionalProperties": false,
"properties": {
"endpoint": {
"description": "The address as host:port; not validated as a URI",
"type": "string"
},
"source": {
"description": "The first source that found the address: announced is an entry of the announced endpoints setting; a changed address can show twice for about five minutes. A client treats an unknown value as unknown",
"enum": [
"announced",
"stun",
"port_mapping",
"stun_local_port",
"local",
"unknown"
],
"type": "string"
}
},
"required": [
"endpoint",
"source"
],
"type": "object"
},
"DirectConnectionsEndpointCandidates": {
"additionalProperties": false,
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/DirectConnectionsEndpointCandidate"
},
"type": "array"
}
},
"required": [
"items"
],
"type": "object"
},
"DirectConnectionsFeature": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -39255,6 +39307,9 @@
"patternDescription": "a non-zero RFC 3339 instant",
"type": "string"
},
"endpoint_candidates": {
"$ref": "#/components/schemas/DirectConnectionsEndpointCandidates"
},
"features": {
"items": {
"$ref": "#/components/schemas/DirectConnectionsFeature"
Expand Down Expand Up @@ -91558,6 +91613,45 @@
],
"type": "string"
}
},
{
"description": "Page size; default 50, maximum 200",
"explode": false,
"in": "query",
"name": "limit",
"schema": {
"default": 50,
"description": "Page size; default 50, maximum 200",
"examples": [
50
],
"format": "int64",
"maximum": 200,
"minimum": 1,
"type": "integer"
}
},
{
"description": "Opaque cursor from page.next_cursor",
"explode": false,
"in": "query",
"name": "cursor",
"schema": {
"description": "Opaque cursor from page.next_cursor",
"maxLength": 8192,
"type": "string"
}
},
{
"description": "Matches the account's username, the device's name or the device ID as a case-insensitive substring; empty after trimming means no search",
"explode": false,
"in": "query",
"name": "q",
"schema": {
"description": "Matches the account's username, the device's name or the device ID as a case-insensitive substring; empty after trimming means no search",
"maxLength": 200,
"type": "string"
}
}
],
"responses": {
Expand Down Expand Up @@ -91667,7 +91761,7 @@
"bearerAuth": []
}
],
"summary": "List the devices that have a direct path to the API host now, with their observed addresses and ports. Needs the acting administrator; no other caller sees an endpoint.",
"summary": "List the devices that have a direct path to the API host now, with their observed addresses and ports, as keyset pages ordered by account and device with a separate count. A search reads every account's names and answers 503 when they cannot be read. Needs the acting administrator; no other caller sees an endpoint.",
"tags": [
"direct-connections"
],
Expand Down
6 changes: 6 additions & 0 deletions docs/architecture/direct-connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,12 @@ share the first priority group with the STUN, router-mapped and guessed addresse
A refusal of the list by the engine, other than a closed engine, logs one Warn
record, and the next computation is the retry.

The status read lists the engine's registered endpoints with their sources
(`endpoint_candidates`). The labels come from the engine, because magicsock keeps
only the first source that found an address, and the events worker stores the list
in the engine's outside-reachability record beside the STUN endpoints, so the read
shows it only while that record's grant fence is open.

### Outside Reachability

The `reachability` row of the admin status is passive; it sends no probe and names no
Expand Down
Loading