Conversation
|
@0lionelzhang0 please review |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3942 +/- ##
==========================================
+ Coverage 80.08% 80.22% +0.14%
==========================================
Files 901 901
Lines 68356 68573 +217
Branches 2645 2699 +54
==========================================
+ Hits 54743 55014 +271
+ Misses 12946 12893 -53
+ Partials 667 666 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks! It'd be nice to get docs on usage in these: |
AI adversarial review✅ Claude and Codex converged after 3 turn(s) with 1 fix commit(s). Reviewed commit: Open concerns for a human
Turn-by-turn logTurn 1: Claude (no changes)The OPENC3_LOCAL_ONLY_TARGETS feature is implemented consistently across the storage controller, TargetFile, TargetModel, LocalMode sync and the Ruby/Python script storage helpers, and path safety is preserved through safe_key?/key_path. I found no defects confident enough to change; the test suites were not run because dependencies aren't installed.
Turn 2: Codex (commit ac993a3ed)Fixed three storage API gaps for local-only targets and added regression coverage. Diff whitespace checks passed; tests and Ruby syntax checks could not run because dependencies and Ruby are unavailable.
Turn 3: Claude (no changes)I checked Codex's three turn-2 fixes (directory downloads return 404, directory deletes include local-only files and skip their stale bucket copies, bulk downloads read local-only files from the local volume). They are correct, stay inside the local mode volume and keep the authorization checks. I found no further defects. CI passed; I did not run the tests locally because dependencies aren't installed.
Warning The fix commits above could not be pushed (the branch probably moved); they were discarded. |
- openc3-cosmos-cmd-tlm-api/app/controllers/storage_controller.rb:348 - Directory downloads returned 500; require a regular file and return 404 otherwise. - openc3-cosmos-cmd-tlm-api/app/controllers/storage_controller.rb:785 - Directory deletion skipped local-only files; include local files and exclude their stale bucket copies from deletion. - openc3-cosmos-cmd-tlm-api/app/controllers/storage_controller.rb:889 - Bulk downloads read local-only files from the bucket; use local contents without bucket fallback. AI-Review-Bot: true AI-Review-Run: 36501940046
delete_bucket_directory scanned the whole scope with build_local_catalog, which mkdir_p's <scope>/targets_modified for any requested scope. Only glob the requested directory, and only if it already exists. Also fix the bulk download spec, which could not read the zip back from a buffer. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merge the nested RBAC check in upload_file, and patch openc3.script globals with patch.object in the local only target tests instead of assigning them directly. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add the variable to the environment reference and a Local Only Targets section to the Local Mode guide covering where files live, the missing plugin fallback, script access and stale bucket copies. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|



What changed
Adds an environment variable that makes certain targets only read/write from local mode for all files.
Why it changed
Allows for local git control of the files COSMOS uses for a target (scripts, screens, tables, notebooks)
Testing strategy
Unit Tests