Skip to content

feat(trimble-connect): related topics, comment edit/delete, viewpoints, BCF documents, ToDo types + one retry contract (floless.app#2184) - #687

Closed
pawellisowski wants to merge 11 commits into
feat/tc-bcf-todosfrom
feat/tc-bcf-followups
Closed

pawellisowski wants to merge 11 commits into
feat/tc-bcf-todosfrom
feat/tc-bcf-followups

Conversation

@pawellisowski

@pawellisowski pawellisowski commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

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:

What

11 more commands, all live-verified on "Take 5"

Command Endpoint (Topics API topic/v2, or Core tcps/2.0)
get-project-extensions GET bcf/2.1/projects/{p}/extensions?includeUsers=false: the types, statuses, labels, priorities and stages a topic accepts
list-related-topics GET …/topics/{t}/related_topics, every page (next followed by skiptoken)
set-related-topics PUT …/related_topics, which replaces the list. mode: add (the default) reads the current list and adds to it; replace sends exactly the list given, and [] clears
update-comment PUT …/comments/{c}, read first so the viewpoint and reply-to links survive
delete-comment DELETE …/comments/{c}
get-viewpoint GET …/viewpoints/{v}
delete-viewpoint DELETE …/viewpoints/{v}
list-bcf-documents GET …/documents, every page
upload-bcf-document POST …/documents as multipart/form-data (carries the filename); max 256 MiB
download-bcf-document GET …/documents/{d}, max 256 MiB
list-todo-types Core GET /todos/types?projectId=

Found live:

One retry contract for every handled command

retrying() in trimble_files.rs now carries every request: folders, files, upload/download (including the pre-signed PUT and GET), BCF and ToDos.

  • A 429 is retried for any method.
  • Any 5xx or transport error is retried only for GET/PUT/PATCH.
  • Up to 3 attempts, with 1 s / 2 s backoff or Retry-After, capped at 30 s.
  • An error after a retry says (after N attempts).
  • ureq::Error is boxed in the closure type, so the code passes clippy with no allow.
  • rate-limits.md now states exactly which commands retry, and how.

Docs

  • 11 command docs.
  • topics.md, projects.md and rate-limits.md updated: 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 to AppData\Local\Temp.
  • aware agent reindex --check ✓, sync_stats ✓.
  • Tests:
    • wire-mock tests for every new command: input refusals, add-vs-replace related topics, comment links kept, the multipart body, a 302 to a non-https Location refused with no further request, and extensions mapped by kind;
    • unit tests of retrying (429 retried for any method, 5xx only when repeatable, a 4xx is final);
    • the emitted-keys guard covers all 27 handler commands.
  • Live (real CLI, dev binary, temp AWARE_HOME, Take 5):
    • get-project-extensions (returned 9 types, 5 statuses, 4 priorities);
    • list-todo-types;
    • two topics, then set-related-topics → list-related-topics shows the relation; mode: replace with [] 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-reference with it (type: FILE).
    • Cleanup: the topics and the uploaded file were deleted. Take 5 lists 0 topics, 0 BCF documents and 0 ToDos.

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:

  • many of those commands take only a folder-id or file-id, so there is no project to resolve a region from;
  • it would need either a new project-id/region input on existing commands, or an agent-level region setting;
  • it can't be verified here, because the only test project is in North America.

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

@pawellisowski

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T08:27:04.531170Z 9082c43 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 0bc57c6ff8

ℹ️ 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".

@pawellisowski

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 5662374b17

ℹ️ 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".

# Conflicts:
#	20-agents/aeco/construction/trimble-connect/skills/rate-limits.md
@pawellisowski

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread cli/src/runtime/trimble_bcf.rs Outdated
Comment thread cli/src/runtime/trimble_bcf.rs Outdated
…e; add-mode never drops a relation on a later page (Codex)
@pawellisowski

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread cli/src/runtime/trimble_bcf.rs
Comment thread cli/src/runtime/trimble_bcf.rs Outdated
…eadline and retry a body cut off mid-read (Codex)
@pawellisowski

Copy link
Copy Markdown
Contributor Author

@codex review

@pawellisowski

Copy link
Copy Markdown
Contributor Author

Closed automatically when #686's branch was deleted on merge. Continued as #689 (same branch and commits, now based on main).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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, || {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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