Skip to content

fix: check package assets for every installed client - #5883

Merged
Sinity merged 2 commits into
masterfrom
fix/client-asset-currency
Oct 2, 2026
Merged

Sinity merged 2 commits into
masterfrom
fix/client-asset-currency

Conversation

@Sinity

@Sinity Sinity commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

Check current package assets independently for every installed agent client. A selective reinstall leaves unreconciled clients visibly stale in status, doctor and plain/JSON CLI output.

Problem

The installer already stores each client's content version and package digest, but status compared only the top-level record. After installing assets A, upgrading to B and reinstalling one client, that aggregate record became current while the remaining clients still retained A. This implements bounded 56.F091 through polylogue-45jrw, preserving the original finding and discovered-from custody in open polylogue-43ltz.

Solution

Compare every installed client's recorded digest and content version with the current package once per status observation. Aggregate readiness derives from those client comparisons. Preserve native_ok as independent native operation integrity, expose client asset_current, name stale clients in diagnostics and render their rows as attention. Doctor consumes the same status verdict. Top-level recorded metadata remains observable and supplies no installation currency authority.

Empty/uninstalled status preserves its informational behavior; doctor still reports no installed clients. Selective removal derives currency from only remaining installations. The existing reference renderer and both packaged/docs mirrors describe current behavior. No schema, registry or native mutation path is introduced.

Verification

Exact final clean head: 5c2b0feae86ba6bc8744451b3e64141332ff0909, tree 39958b36c6d19b05330877be9822656d26d0aafc.

agentctl job start polylogue pytest_focused --workspace <checkout> -- tests/unit/agent_integration/test_installer.py tests/unit/agent_integration/test_assets_and_cli.py tests/unit/agent_integration/test_manual_contract.py tests/unit/devtools/test_agent_integration_module.py -p no:randomly
agentctl job start polylogue verify_quick --workspace <checkout>

Complete owning selection job 6270: 64 passed, exit 0, receipt 20261002T054400Z-focused-test-2990298-11235a85. Quick job 6271: all 12 gates passed, exit 0, receipt 20261002T054405Z-quick-2990300-52364ab3. Both receipts start and end clean on the exact final head; no rerun or earlier-head reuse. Earlier quick 6268 failed solely on two test constant export references; the canonical version correction was verified in the complete final selection.

Eight upgrade variants reinstall each of the four clients independently after either actual packaged resource byte changes or a declared content-version change. Production status/doctor and both command formats identify the three remaining stale clients, preserve their original native records and keep the updated client current. Additional controls cover stale aggregate/current clients, empty state and selective uninstall. Existing native drift, interrupted install/uninstall, idempotency, rollback, asset parity and command contracts are included.

Self-review

Hosted Code Review is disabled by the operator. The author reread the whole seven-path diff and both required checklists; the final pass was clean after the test version correction. Root reviewed the main and correction deltas with no finding.

Author final whole-diff pass on 5c2b0fe against c09a858. Reread target AGENTS, nested devtools rules, docs/review/codex-review-guide.md and generic worker checklist. Two passes, final pass clean after the canonical-version test correction. Root reviewed the full seven-path main delta without a finding.

Project checklist:

  1. ✓ Siblings and owners. Existing install writes per-client package provenance; status owns its comparison, doctor consumes the same verdict and CLI emits the same client currency. Census of AgentIntegrationManager, asset_current and native_ok includes the actual devtools native verification owner and both CLI commands. No second classifier is introduced.
  2. ✓ The fix itself. Both digest and content version participate in the per-client comparison. A selective reinstall updates only selected records; aggregate readiness combines every recorded installed client. The top-level recorded fields remain observations, with controls proving they cannot override client evidence.
  3. ✓ Memory and limits. The comparison adds two scalar equalities per existing client and no new collection, cache, cap or timeout. Existing client payload retention is unchanged; no corpus data is acquired.
  4. ✓ Cost per unit. Current package digest is computed once before the existing client loop, not once per client. No native operation or package asset is re-read by the new predicate.
  5. ✓ Interruption. Existing prepared install/removal journal and transaction owners are untouched. Interrupted client native_ok remains false independently of currency; existing killed-install/uninstall controls are in the complete installer module.
  6. ✓ Ordering and races. Status compares one loaded signed state to one current package digest. It performs no reconciliation write. Native install locking, journaling and rollback remain intact. The stale-top control compares state bytes before/after observation.
  7. ✓ Failure classification. Existing state-integrity refusal and native missing/drifted/invalid observations are preserved. Stale package evidence explicitly blocks readiness with a named client diagnostic; no exception suppression or weaker fallback added.
  8. ✓ Silent outcomes. Every stale client gets asset_current false, a diagnostic and CLI attention. Overall status/doctor and both command exits report failure when any installed client remains stale. The freshly reinstalled client remains current/native_ok true.
  9. ✓ Cleanup on failure. No production resource acquisition added. Synthetic installations use the existing temporary test home; no live client configuration is touched. Existing rollback/uninstall controls cover cleanup consumers.
  10. ✓ Identity and keys. The existing aggregate asset hash and declared content version are reused exactly, without an inferred model, new hash or registry. Per-client native operation identity and state integrity remain unchanged.
  11. ✓ Lossless transforms. Selective install controls compare all untouched client records byte-for-value with their original records. Package metadata updates do not rewrite stale native files through observation. Renderer and both packaged/docs mirrors changed together.
  12. ✓ Degenerate inputs. Empty/uninstalled status preserves existing informational readiness and doctor refusal. Selective removal of current versus stale clients proves aggregation follows only remaining installations. Both stale digest and stale version are exercised in both aggregate directions.
  13. ✓ Consumers. The only human renderer now includes asset_current false in attention. JSON carries the authoritative client field, doctor consumes status, generated docs come from the existing renderer. Existing aggregate-only predicate is removed, with no alias or compatibility path.
  14. ✓ Tests and stubs. Four real synthetic native client installs run against copied packaged resources. Actual resource bytes change for digest upgrades; version controls patch the actual installer version owner. All four clients are independently reinstalled. Restoring aggregate-only currency hides three stale clients; dropping either field fails its variant; omitting CLI attention fails the rendered row contract.
  15. ✓ Trust boundaries. Public files contain only code, generated current behavior docs and neutral fixture builders. Package snapshots, signed synthetic state and receipts remain in temporary locations. No operator assets, secrets, captures or live installations enter the diff.

Generic worker checklist:

  1. ✓ Criteria. The currency and consumer laws are exercised through actual install/status/doctor and plain/JSON CLI. Delivery remains pending exact-head quick/hosted checks and protected merge; no full parent acceptance is claimed.
  2. ✓ Defect classes. rg census covered all package digest/version writers, status/doctor, native_ok/asset_current readers, CLI renderer and generated reference owner. Selective install and both selective uninstall cases share the same status law.
  3. ✓ Replacement. Aggregate metadata readiness authority is retired in the same change, preserving observations. All genuine consumers use per-client currency; no second registry, fallback or schema introduced.
  4. ✓ Failure visibility. Stale client evidence blocks overall readiness and command exit, while native integrity remains separately observable. Existing integrity and interrupted-operation refusals remain.
  5. ✓ Discriminating controls. Aggregate-only check fails current-top/stale-client cases; top-level authority fails stale-top/current-client cases. Version-only or digest-only comparisons fail one upgrade variant. A renderer ignoring currency falsely labels stale clients ok. Empty/selective-removal controls expose incorrect aggregate membership.
  6. ✓ Public evidence. Original 56.F091/PR3061 custody is retained in child polylogue-45jrw. Full diff uses synthetic homes/package revisions; historical threads and live client installs remain untouched.

Residuals

Normal push job 6276 passed all 12 pre-push quick gates on the exact head, receipt 20261002T054634Z-quick-2995425-7c53177d. Protected delivery awaits required hosted checks, fresh exact-head thread readback and merge. This is the bounded F091 implementation; parent polylogue-43ltz and its other residuals remain open. Historical review threads retain their original custody. All installations are neutral test homes. No live client install, host activation, corpus/whale run, provider/default change or private archive action occurred.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 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
🔒 Security Review ✅ Completed 2026-10-02T05:50:20.034630Z 5c2b0fe PR opened
ℹ️ 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.

@Sinity
Sinity merged commit d5267ed into master Oct 2, 2026
3 checks passed
@Sinity
Sinity deleted the fix/client-asset-currency branch October 2, 2026 05:50
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