Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .agents/skills/verify-lane-schedule/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ With every fact TRUE in the code, setting each fact FALSE in the model alone fai

## Coverage record

Sync commit: `0f5979dd0589da6224230f74e9bc7d15143ef5d1` (the last commit at which someone confirmed that the model describes this code; only `check.sh --record` moves it).
Sync commit: `33c2441001bb13345d5304a891ca6f16ccf0b24b` (the last commit at which someone confirmed that the model describes this code; only `check.sh --record` moves it).

Every declaration in these files is covered:

Expand Down
15 changes: 9 additions & 6 deletions .agents/skills/verify-lane-schedule/model/fingerprints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ internal/api/handlers_sync.go:import_"cmp" 6ee637994d3b529ead32b904453999f4347fa
internal/api/handlers_sync.go:import_"context" 35d620b75b6b66f8c228f26b970a741d77137e4e691aa896119dd9d000eaadd2
internal/api/handlers_sync.go:import_"encoding/json" fe3dcc1a8fa119065b01019a2ad5ec1705648b9ce41c6ae8bfbc6b1d438adf42
internal/api/handlers_sync.go:import_"errors" a94ac0ab3a513cbb2bed2f97787a32bf9d423101f67d08dab897af948672c924
internal/api/handlers_sync.go:import_"fmt" 7b04a3fec895247a2e6af9e527c6e53593a4afd23cf0b2ba70f3d8edb3fbc397
internal/api/handlers_sync.go:import_"github.com/coder/openstorage/internal/auth" a6fc462be510789f5df8f2fd769b94612c4099fecfdd8be88a7a6b4ac6f12b03
internal/api/handlers_sync.go:import_"github.com/coder/openstorage/internal/meta" 4260dc2e40a07d98bb999c941803200e032f17530aab6c21fd272ac3fcd2fdb6
internal/api/handlers_sync.go:import_"github.com/coder/openstorage/internal/sync" 3b3f0175cf3dee88544af1c7af3be7e737e79ae40f672de5cc2c6cc7e6d1f40e
Expand All @@ -88,6 +89,7 @@ internal/api/handlers_sync.go:isUpstreamDetach 25715f9e18d1bf7bc62e630e8164eab04
internal/api/handlers_sync.go:parseUpstreamConfig dd27982847b44628b2a14a4364e4a23ea414ef90a9e7a05cb5f7edc52e12cc00
internal/api/handlers_sync.go:policyDeniesPullUpstream 098960c7bef537c91ca905ce894432882eef7ef465a3ddb0b0f9e7224be746e7
internal/api/handlers_sync.go:registerSyncRoutes 30a124203d6812c4b8fa939a4866caae6a74ac2b0b71e36a7de2fed3e0c25134
internal/api/handlers_sync.go:sentHost 06d61ad20c0eda8ee6d85423eba7a886af4d12740a62517242e024cb01e1381d
internal/api/handlers_sync.go:syncServer.answerTakenSyncName 22cf55fac3487ceec250be953518f3cd9b54265fa9061a6f94c4dd2d8567b0e5
internal/api/handlers_sync.go:syncServer.completeOwnSyncCreate a301e0bad45ed03f793aa89eca3036f4e652051a33060812075c97ccf1076b16
internal/api/handlers_sync.go:syncServer.createAbandon 07809dcf477a5a8cec0ff8c63825bddf587cc49377865352ec4ce616d5ac9fda
Expand All @@ -108,10 +110,11 @@ internal/api/handlers_sync.go:type_usyncBaseRepo fa63c2d8bb62db2a56acff9a8de55e5
internal/api/handlers_sync.go:type_usyncBaseRepoAuth cbce39e3f3df0443cfcb499a9e439e361335ee86e6e97c205c21b18b48141cd6
internal/api/handlers_sync.go:type_usyncPullUpstreamRequest b98132ea1ae7690f3f00aece7dd8fb2a00f69d0e9ea5f1f95c198c983cc18b0b
internal/api/handlers_sync.go:type_usyncPushUpstreamRequest 3ad57ba2d21ad394741cb6b3ced05a273c72b38ca84d7a73b34d79b4510f4284
internal/api/handlers_sync.go:upstreamConfig.validate 2f930a6635c9e09c1c0e59a36ebd0a95da941d2158b8ca4bb5a73d7cf558ca17
internal/api/handlers_sync.go:upstreamConfig.validate 93145c084d06574d887a74f780b331417c9198d38d5bd65a4d46824ff201cfd9
internal/api/handlers_sync.go:upstreamHostname f65b41a625e2606e71c567cbc6d99d991e59b6ef4da9e976294b9ff3895aac34
internal/api/handlers_sync.go:upstreamURLProblem e66d2c29ef48b6891a62cca5ace9afbd52d579f5f4ae11aeba3cc61b3f3c488d
internal/api/handlers_sync.go:validUpstreamHost 577f0a7dca4f2f92aef75121a9ba2f3de54ed91a6a0807f81e4d70193bd58a52
internal/api/handlers_sync.go:validateSyncBaseRepo 772f61c09307f8b94a4f792fc5595630ae83bec2bf4b82a68bc735398768cc90
internal/api/handlers_sync.go:validateSyncBaseRepo ff9604dc1950f41a1e0d3c506440c67f51a3b399ee34a83a94cea08459594331
internal/api/handlers_sync.go:withStrictPullBody 449923a2f639f42183416d391cac81b304bcf8b6cda9d207474e66e16178766f
internal/api/handlers_sync.go:withUpstreamDetach b16659bb293b5f9eb05b5ade652dfe4fb224e8a7b6c475829007ee1933a164ec
internal/events/refstore.go:BaseRepoID d45f84f8f7f8b9e27d21c7b17553527e76db8c3a5fa34718d2768840b351c8ae
Expand Down Expand Up @@ -757,14 +760,16 @@ internal/sync/worker.go:Worker.restoreLocal 26a4d6afcb497aad19bf44a05a934271739a
internal/sync/worker.go:Worker.retryFinish ffaeb07c443ff810394a4163e9bbba358e94167e2a862610fc85ea7cd04bb3ac
internal/sync/worker.go:Worker.retryFinishWithin e5d50e3769f6ee0472f6f27eea02cb1f50b666bc32e18f95bc357ee6a270617c
internal/sync/worker.go:Worker.transfer 9a7214ab5245a9dff3f77236343915bd12d363e65d0a931d562ddb5aabe7046e
internal/sync/worker.go:Worker.upstreamAuth 75d2138c45b126b08085f60b4ab76dc7c541ba77b8774aaa67c7db58ac0508f4
internal/sync/worker.go:Worker.upstreamAuth f7c972b140b7e1c99a838e12a0874a06c59d8a1e56b1ad20ca51ad93acfdbac9
internal/sync/worker.go:Worker.waitPublication 5523b2acf8503a7d67b1c7a16ac8193b665e56cf2359c4b2c665712c2387079f
internal/sync/worker.go:allLocalWins 2e1ed7ba97088a77c021e2f4b6814a936cd110f583795fddf5b52e55a198452a
internal/sync/worker.go:authGitEnv 3f12bf1bdc1c34f599c5eb37ea5b01b61eb5e88bef4850133b8620f1994e717b
internal/sync/worker.go:claimContext c804c041a9696fa2f25121c65031f594017701ce95023b23ed677523b8dc2af8
internal/sync/worker.go:claimLease c4e9048ce62dc44ec0095330d893478da5b9d84e20caa798125a4e8c3fa64dce
internal/sync/worker.go:classifyFetchFailure f70cf722890e1703edf17e5d89762e4a3f32b49102eabbb1314a18c41ce75a42
internal/sync/worker.go:classifyPushFailure 2389057e736b3844b0b69c1171f7a502a5c12219f91d19da17d273ffd26b7977
internal/sync/worker.go:const_MaxCredentialBytes e953924b849f74132b59fde912c5fc10da98559cfe437ad7f407f670587ceea1
internal/sync/worker.go:const_MaxUpstreamURLBytes 65714124227545669b488bb3f7700b4963e57550b4a11b2ac82407070da2a102
internal/sync/worker.go:const_claimFenceMargin 6152874979c4576b0964fc7d77f93d9510f0d5ad648137d7650e2ef965ac6cb4
internal/sync/worker.go:const_claimLeaseSlack 75bc413ad4dddefab0fe6b0831b1f754f3526a77e08c2f294249fb7aba5f7bdb
internal/sync/worker.go:const_defaultRunTimeout 248c39614bd5f60b5e7b7245d8ddb644c406386aee36a5b5a9b855b5b87e5ba4
Expand All @@ -774,8 +779,6 @@ internal/sync/worker.go:const_finishSyncAttempts 90532dd664650956ab4924c95cd15d6
internal/sync/worker.go:const_gitCredentialHelper 3109b7a280092f426cb473da823e3627281580830a7f7c2343ea8a1c4662db9d
internal/sync/worker.go:const_localPublicationRetryDelay 963a26c10d88d979392c7d2ea65b948d998c245b8d8e150368f0a2724d57ed35
internal/sync/worker.go:const_localPublicationWaitTimeout 0cb9c18756fc851aedff391a3ab0c18de9efd089592812aa214dab2964985d2e
internal/sync/worker.go:const_maxCredentialBytes 98750963cc70d915fdbc6f65075b3a99b14977ce30cbf7aeadbd8f9656a11daf
internal/sync/worker.go:const_maxUpstreamURLBytes 0a542ae23e38888620342e09c841e9a979ed63bdbb97cb43634eb5aa03b73ca3
internal/sync/worker.go:const_shutdownRestoreDelay 32040a037f16b75ee6bd37c9d600b621277690f9cca1965d6c5b2c705f5a5785
internal/sync/worker.go:const_shutdownRestoreTimeout d6c2c3e701cd3841cbe1687a2b45790e9c5d4a2b48cf15e6e2567922a2555616
internal/sync/worker.go:containsAnyMarker 162157c304b7474a3d545d6ce708cd229788e83acf94c884db594cd56c9a7d12
Expand Down Expand Up @@ -813,7 +816,7 @@ internal/sync/worker.go:type_RepoInfo e8a02330a52c30199fa31037b4286d8d23ab173f23
internal/sync/worker.go:type_RepoLookup 819f1bc4b699b113c5c1400e9137b05dd20a8fa12cd1d0d621cca9ac686e29df
internal/sync/worker.go:type_Worker 02235720d66907846dcf03ab0427a9eec32fb417af3c0462bbf5a381c76dfdf1
internal/sync/worker.go:type_syncFailure 6f04984a8621d6e7bf3665dd7af1eb8f7634d923899e5e61b18c60e246c3c59c
internal/sync/worker.go:upstreamURLFailure c95da462ad37745269d7f07a9019c3cc127cad41551c2549cb6bbe3d14483194
internal/sync/worker.go:upstreamURLFailure a4f2c466197974a038dfc2edd51f12da58db9bb332df8709573a6fbd3101cd20
internal/sync/worker.go:var_authFailureMarkers 28df1810afcf9a0f750de4a7b73b0a925f66ba08df738a9c43a062abc68c8d40
internal/sync/worker.go:var_errClaimStolen 5869b81a47a71928975f5577f5b485bef2e6d0d98f3fd0f31a81b191a67f74a6
internal/sync/worker.go:var_errDetached 09503fc22b7999840131138daf5a27e594cb8b6773f3be5b2001b2bbb0d356e2
Expand Down
1 change: 1 addition & 0 deletions docs/explanation/wire-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ the [archived phase notes](../archive/phases/)):
| A `crit` member in the JWT header: the vendored docs and spec say nothing about it. They list `alg` and `typ` as the header ([authentication guide](../upstream/getting-started/authentication.md)) | A token whose header has a `crit` member of any value fails verification, even when the signature is valid. The status is the one for any token that fails verification (the row above) | RFC 7515 §4.1.11: a recipient that does not understand a listed extension must refuse the token. open.storage understands none, so it refuses any `crit` |
| Every path field and `path` parameter is a plain `type: string`. The spec says nothing about tree entry names whose bytes are not valid UTF-8 | A response path that is not valid UTF-8 still lists with one U+FFFD per invalid byte, and gets an extra sibling `<field>_base64` with the raw bytes in standard base64 (for example `path_base64`, `paths_base64`, `old_path_base64`, `original_path_base64`). The sibling is absent for valid UTF-8 paths, so those responses are unchanged. This covers `files`, `files/metadata`, the diff routes, `blame` and `grep`. The merge conflict paths do not have it yet, and JSON request bodies cannot name such a file yet. The `path` query parameter takes the raw bytes percent-encoded ([path encoding](../reference/http-api.md#conventions)) | JSON strings hold Unicode text, so such a byte has no exact JSON form. A sibling field (like GitHub's `pathRaw`) is additive: no SDK reads it, and the SDKs ignore response keys they do not know. If upstream documents another form, we carry both ([#587](https://github.com/coder/openstorage/issues/587)) |
| Text the request asks the server to store (a webhook `secret`, a git credential `username` and `password`, the `owner`, `name` and `auth.token` of a sync link, a `pull-upstream` `ref`) is plain `type: string`. The spec documents no `400` for its content | Such a value that holds a NUL byte answers `400` `bad_request` ("invalid secret (want UTF-8 text without NUL)", with `invalid_params` naming the field where the route has them), on every backend. A `GET /repos` `cursor` whose repo ID holds a NUL byte or invalid UTF-8 answers the `400` of an undecodable cursor. A path or body ID with such text (a webhook or git credential `id`) answers the `404` of an unknown ID | PostgreSQL refuses a NUL byte or invalid UTF-8 in a text parameter (SQLSTATE 22021) and answered `500` for most of these values, while SQLite and S3-WAL stored them. With `OPENSTORAGE_SECRETS_KEY` set in the default `encrypt` mode, the `secret`, `password` and `auth.token` reach PostgreSQL encrypted, so PostgreSQL stored them too, and such a value now answers `400` there as well. A `ref` is stored only by PostgreSQL's job queue, as `jsonb`, which cannot hold a NUL (SQLSTATE 22P05). Every backend now gives the same answer, as for `q` and `prefix` below. The PostgreSQL store answers `ErrNotFound` for such a key before it runs the query |
| The `owner` and `name` of a sync link (`upstream`, `base_repo`), its host (`upstream.host`, `base_repo.upstream_host`) and `base_repo.auth.token`, and a git credential `username` and `password` are plain `type: string` with no `maxLength`. The spec documents no `400` for their length | A sync link whose upstream URL (`https://{host}/{owner}/{name}.git`, or the host as given when it has a scheme, without trailing `/`s) is over 131,070 bytes, and a token, `username` or `password` over 131,042 bytes, answer `400` before anything is stored, with `invalid_params` naming each field ("invalid upstream URL (want at most 131070 bytes)": the `owner`, the `name`, and the host when the body sent one) ([HTTP API](../reference/http-api.md#repository-lifecycle-repowrite--orgread)) | The sync run gives git the URL as one argument and each credential value as one environment entry, and Linux refuses one of 128 KiB or more, counting its terminating NUL and the `/` that git adds to the URL or the name of the variable. Such a link failed every run as `repository configuration error`, and the client learned it only from the failed run. A link or credential stored without the check (before it, or by an older server during an upgrade) still fails its runs that way |
| `commit_message` and the `name` and `email` of an `author` or `committer` (`commit-pack`, `diff-commit`, `restore-commit` and `POST /repos/merge`), the `author` of `POST /repos/notes` (also the deprecated body of `DELETE /repos/notes`), and the `query.pattern` of `POST /repos/grep` are plain `type: string`. The spec documents no `400` for their content | Such a value that holds a NUL byte answers `400` ("invalid commit_message (want UTF-8 text without NUL)"). `merge`, `notes` and `grep` name the field in `invalid_params`. `commit-pack` and `diff-commit` answer the result envelope with `status` `invalid`, and `restore-commit` the plain problem body. A merge request refuses the NUL even when no commit is made, as it refuses a newline in an ident | git refuses a NUL in a message, takes a pattern as a process argument and an ident as an environment value, and none of them can hold a NUL. These requests answered `500` |
| Every `path` parameter, grep `paths` entry and `query.pattern`, blame `range`, and the `name` and `email` of an `author` or `committer` (commit writes, `merge`, `notes`) is a plain `type: string` with no `maxLength`. The spec documents no `400` for their length | A `path` or `paths` entry over 131,060 bytes, a `range` or `query.pattern` over 131,071 bytes, and a `name` or `email` over 131,051 bytes answer `400` before git starts, with the field and the limit in the message ("invalid path (want at most 131060 bytes)"). `merge`, `notes` and `grep` name the field in `invalid_params`, and `commit-pack` and `diff-commit` answer the result envelope with `status` `invalid`. A `commit_message` has no such limit: git reads it on standard input ([HTTP API](../reference/http-api.md#conventions)) | git takes each of these values as one argument or one environment entry, and Linux refuses one of 128 KiB or more, counting its terminating NUL. These requests answered `500` from 128 KiB on. The limit holds on every platform, so a client gets the same answer from every server |
| The grep `paths` array and the repeated `path` (diff routes) and `range` (blame) parameters have no `maxItems`, and the spec documents no `400` for their size | Such a list whose entries hold more than 65,536 bytes together, each entry counting its length plus 32 bytes, answers `400` before git starts, with the list and the limit in the message ("invalid paths (want at most 65536 bytes for all entries, each counting 32 more)"), and grep names `paths` in `invalid_params`. A list of one entry gets this answer from 65,505 bytes up to the limit of the entry itself, past which the entry is named ([HTTP API](../reference/http-api.md#conventions)) | git takes each entry as an argument of its own, and Linux limits all arguments and environment entries of one program together: to a quarter of the stack limit, and to 128 KiB for a stack limit from 144 KiB to 512 KiB (measured with 4 KiB pages). A grep with many short `paths` passed that total even with the usual 8 MiB stack limit and answered `500`. The limit is half of those 128 KiB and holds on every platform |
Expand Down
Loading
Loading