Repository navigation
feat(trimble-connect): related topics, comment edit/delete, viewpoints, BCF documents, ToDo types + one retry contract (floless.app#2184) - #687
Conversation
…ers, files, uploads, BCF, ToDos
…e viewpoint, project extensions, BCF documents, ToDo types — live-verified (floless.app#2184)
# Conflicts: # cli/src/runtime/trimble_bcf.rs
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
# Conflicts: # 20-agents/aeco/construction/trimble-connect/skills/rate-limits.md
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c09a9d0180
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…e; add-mode never drops a relation on a later page (Codex)
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6148b7783f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…eadline and retry a body cut off mid-read (Codex)
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9082c43d7a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| req = req.set("If-Match", v); | ||
| } | ||
| json_body(req.send_string(&body.to_string()), what) | ||
| let (res, n) = retrying(true, || { |
There was a problem hiding this comment.
Keep conditional PATCHes out of automatic retries
When update-folder or update-file supplies if-match and the first PATCH commits but its response is lost, this retries with the now-stale version ID and returns a 412 even though the mutation succeeded; without if-match, repeating a successful move can create another item version. Treat these PATCHes as non-repeatable unless the retry can recover the updated version before resending.
Useful? React with 👍 / 👎.
| .get(presigned) | ||
| .call() | ||
| .map_err(|e| AwareError::Network(format!("download GET: {e}")))?; | ||
| let (res, n) = retrying(true, || agent.get(presigned).call().map_err(Box::new)); |
There was a problem hiding this comment.
Include the download body in each retry attempt
When the generic Files download server sends headers and then drops the connection, .call() has already made retrying return success, while read_to_end runs afterward and fails without another GET. Although the BCF-document path now retries a cut-off body, this separate generic download path still does not satisfy the newly documented dropped-connection retry contract; consume the body inside the retryable operation.
Useful? React with 👍 / 👎.
Refs pawellisowski/floless.app#2184
Stacked on #686, so the diff shows only the follow-ups. Merge #686 first; this PR then retargets to
main.Why
#686's follow-up list:
skills/rate-limits.md: 3 attempts,Retry-After) was not implemented for the folder, file or upload commands.What
11 more commands, all live-verified on "Take 5"
topic/v2, or Coretcps/2.0)get-project-extensionsGET bcf/2.1/projects/{p}/extensions?includeUsers=false: the types, statuses, labels, priorities and stages a topic acceptslist-related-topicsGET …/topics/{t}/related_topics, every page (nextfollowed by skiptoken)set-related-topicsPUT …/related_topics, which replaces the list.mode: add(the default) reads the current list and adds to it;replacesends exactly the list given, and[]clearsupdate-commentPUT …/comments/{c}, read first so the viewpoint and reply-to links survivedelete-commentDELETE …/comments/{c}get-viewpointGET …/viewpoints/{v}delete-viewpointDELETE …/viewpoints/{v}list-bcf-documentsGET …/documents, every pageupload-bcf-documentPOST …/documentsasmultipart/form-data(carries the filename); max 256 MiBdownload-bcf-documentGET …/documents/{d}, max 256 MiBlist-todo-typesGET /todos/types?projectId=Found live:
guidis the Files API id, and BCF has no delete (delete-fileremoves it). Thedocument_guidcorrection went to feat(trimble-connect): BCF 2.1 topics, comments, viewpoints, document references + ToDos (floless.app#2184) #686, where the claim lived.302to a pre-signed file-service URL. That one hop is followed: https only and without the token, asdownloaddoes. Any other redirect is still refused.One retry contract for every handled command
retrying()intrimble_files.rsnow carries every request: folders, files, upload/download (including the pre-signed PUT and GET), BCF and ToDos.429is retried for any method.5xxor transport error is retried only for GET/PUT/PATCH.Retry-After, capped at 30 s.(after N attempts).ureq::Erroris boxed in the closure type, so the code passes clippy with noallow.rate-limits.mdnow states exactly which commands retry, and how.Docs
topics.md,projects.mdandrate-limits.mdupdated: command maps, the BCF-documents-are-files finding, and the retry scope.Verification
cargo fmt --check✓,cargo clippy --all-targets -D warnings✓.cargo test: 2694 passed, 0 failed before merging feat(trimble-connect): BCF 2.1 topics, comments, viewpoints, document references + ToDos (floless.app#2184) #686's latest fixes in; afterwards the 78 trimble tests pass. Run locally on Windows with TEMP set toAppData\Local\Temp.aware agent reindex --check✓,sync_stats✓.302to a non-https Location refused with no further request, and extensions mapped by kind;retrying(429 retried for any method, 5xx only when repeatable, a 4xx is final);AWARE_HOME, Take 5):get-project-extensions(returned 9 types, 5 statuses, 4 priorities);list-todo-types;set-related-topics→list-related-topicsshows the relation;mode: replacewith[]clears it;update-comment(text changed) →delete-comment;get-viewpoint→delete-viewpoint;upload-bcf-document→list-bcf-documents→download-bcf-document(bytes round-trip, via the 302 hop) →create-document-referencewith it (type: FILE).Not done: region-aware Core base
ToDos and the folder/file commands still use the fixed master base
app.connect.trimble.com. Routing them by region (like BCF) needs a product decision, not just code:folder-idorfile-id, so there is no project to resolve a region from;project-id/regioninput on existing commands, or an agent-level region setting;It belongs in its own issue.
Review rounds: 5 (self-feeding: 0) — rounds: Codex CLI r1 clean (base feat/tc-bcf-todos); Codex GitHub r2 clean on 0bc57c6, r3 clean on 5662374; Codex GitHub r4 on c09a9d0: add-mode related topics read only page 1 (P1) + related/document lists dropped later pages (both pre-existing), fixed 6148b77 with tests shown failing without the fix; Codex GitHub r5 on 6148b77: document transfers bound by the 120 s deadline + a body cut mid-read not retried (pre-existing), fixed 9082c43; outcome: awaiting Codex on 9082c43
🤖 Generated with Claude Code