Skip to content

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

Merged
pawellisowski merged 28 commits into
mainfrom
feat/tc-bcf-followups
Oct 11, 2026
Merged

pawellisowski merged 28 commits into
mainfrom
feat/tc-bcf-followups

Conversation

@pawellisowski

@pawellisowski pawellisowski commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Refs pawellisowski/floless.app#2184

Follow-up to #686 (merged). Replaces #687, which GitHub closed when #686's branch was deleted; same branch, same commits, same review history.

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

fetch() in trimble_files.rs now carries every request, its body included: 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: 8 (self-feeding: 1) — 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; Codex GitHub r6 on 8b47dc8 (#689): file download body not retried + oversized document decoded before the size check (pre-existing), fixed dbe5692; Codex GitHub r7 on dbe5692: JSON body reads outside the retry + nested retries compounding to 9 GETs (self-feeding: the r6 read_retrying fix), rebuilt as one fetch primitive in d010e6a (body read inside the retry, one budget per request); Codex GitHub r8 on d010e6a: If-Match PATCH resent after a fault (pre-existing retry choice), fixed c3160f8; outcome: awaiting Codex on c3160f8

🤖 Generated with Claude Code

…184)

Topics API is regional: resolve the project's location via /projects + /regions and
send the token only to the five published open* Topics hosts; no redirects. ToDos
on the Core base. Plan hardened with Codex (3 rounds).
… the rate-limit contract; refuse null status/priority/percent on update-todo (Codex)
…e viewpoint, project extensions, BCF documents, ToDo types — live-verified (floless.app#2184)
# Conflicts:
#	cli/src/runtime/trimble_bcf.rs
…ates instead of hand-written structure checks (Codex; operator chose rebuild)
…tates what retries and what returns data (Codex)
# Conflicts:
#	20-agents/aeco/construction/trimble-connect/skills/rate-limits.md
…e; add-mode never drops a relation on a later page (Codex)
…eadline and retry a body cut off mid-read (Codex)
# Conflicts:
#	20-agents/aeco/construction/trimble-connect/manifest.yaml
#	20-agents/aeco/construction/trimble-connect/skills/projects.md
#	20-agents/aeco/construction/trimble-connect/skills/rate-limits.md
#	20-agents/aeco/construction/trimble-connect/skills/topics.md
#	40-diagrams/substrate-playground.html
#	cli/src/runtime/trimble_bcf.rs
@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-11T14:36:40.829156Z 95993f1 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 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: 8b47dc8bee

ℹ️ 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_files.rs Outdated
Comment thread cli/src/runtime/trimble_bcf.rs
@pawellisowski
pawellisowski enabled auto-merge (squash) October 11, 2026 11:47
…ized BCF documents refused before decoding (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: dbe5692837

ℹ️ 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_files.rs Outdated
Comment thread cli/src/runtime/trimble_files.rs Outdated
… is read inside the retry contract, one attempt budget per request (Codex; rebuilt rather than patched)
@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: d010e6aea1

ℹ️ 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_ops.rs Outdated
@pawellisowski

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: c3160f8739

ℹ️ 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:
#	cli/src/runtime/trimble_bcf.rs
@pawellisowski

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 95993f1401

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

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