Skip to content

fix(adb): drop the remaining exclusivity claim from push guidance - #2868

Closed
CodesWithRobi wants to merge 1 commit into
morluto:mainfrom
CodesWithRobi:fix/adb-push-not-only-mutator
Closed

CodesWithRobi wants to merge 1 commit into
morluto:mainfrom
CodesWithRobi:fix/adb-push-not-only-mutator

Conversation

@CodesWithRobi

@CodesWithRobi CodesWithRobi commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

#2990 fixed the false exclusivity in the push_adb_file contract text and closed #2602, but the change stopped at the contract surface: AdbProvider's class comment still described the caller-requested file push as the only device mutation, and nothing guards that claim from returning.

This rebases onto current main and follows up on that fix (Refs #2602):

  • Correct the AdbProvider class comment; install, uninstall, start-app, start-activity, and stop-app also mutate device state.
  • Add a contract-wide regression test that no tool description claims to be the only device-mutating operation.
  • Assert the emitted device-mutation limitation for every push_adb_file digest verdict: device-side sha256sum verified, unavailable, and unrecognized output.

The contract description and limitation strings stay as main defines them, so this no longer duplicates the merged fix.

Problem and expected behavior

Smallest trigger: read AdbProvider's class comment on main after #2990 — it still says the file push is the only device mutation, although several ADB tools declare mutatesDevice: true in src/contracts/toolEffects.ts. Expected: no surface claims exclusivity, and a test keeps it that way.

Change and scope

Documentation and tests only; no behavior change. The contract description and limitation strings are unchanged from main, so the diff is limited to the missed comment and the new coverage. Not included: any change to ADB tool effects, schemas, or descriptions.

Contract and boundary impact

  • Semantic owner and earliest changed stage: AdbProvider doc comment (src/adb/AdbProvider.ts); tests in src/adb/AdbProvider.test.ts and src/contracts/toolEffects.test.ts
  • Contribution scope fit and linked maintainer decision: standalone correction within existing ADB boundaries; not applicable
  • CLI and MCP/tool-catalog contract: none (description text unchanged from main)
  • Provider, bridge, target-format, or platform compatibility: none
  • Evidence, artifact, provenance, or reconstruction contract: none
  • Target selection, authority, upstream behavior, and cleanup details: none
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none

Expected effects (check known effects; use documentation-only on its own).

  • Read existing files or captured data.
  • Documentation or usability only; no target interaction.

Evidence and regression coverage

  • Tests added or updated: toolEffects.test.ts rejects any contract claiming to be the only device-mutating tool; AdbProvider.test.ts asserts the device-mutation limitation for every push digest verdict (verified, unavailable, unrecognized output).
  • Base reproduction or other evidence: before this change the AdbProvider comment claimed exclusivity while toolEffects.ts marks several ADB tools as device-mutating.
  • User-visible CLI/MCP output: none.
  • Remaining proof gaps: none for a documentation/test-only change.

For evidence-bearing changes: not applicable.

Validation performed

On main f4b2ba131 after rebasing:

  • npm run test:local -- src/adb/AdbProvider.test.ts src/contracts/toolEffects.test.ts — 99 passed
  • npm run check:fast — pass
  • npm run docs:check — pass

Main's #6010 renamed the push limitation to "Push writes a private snapshot of the caller's file to the device" and added a third digest verdict. The assertion uses toContain on that limitation, so it covers all verdicts without breaking on further wording changes.

Compatibility, safety, and release

  • Breaking changes or migration steps: none
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable
  • Package or release metadata impact: none
  • Security, privacy, process, or containment review: none; documentation and tests only

Author readiness

Human owner: @CodesWithRobi

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above (fix(adb): remove false exclusivity from the push-file description #2602 is already completed by fix(adb): remove false exclusivity from the push-file description #2990; this is a follow-up).
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output. (not applicable)
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 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-23T08:59:19.815191Z 56bdd57 Draft marked ready
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no blocking issues were found.

Summary

Corrects the remaining exclusivity claim in AdbProvider and adds regression coverage.

  • ADB guidance now recognizes that several operations change device state.

Reviews (9) · Last reviewed commit: "fix(adb): drop the remaining exclusivity..." · Reviewed by Greptile

Comment thread src/contracts/toolEffects.test.ts Resolved

@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: fc9eab7465

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/contracts/toolEffects.test.ts Resolved

@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: 5a9d7d82de

ℹ️ 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 src/adb/AdbProvider.test.ts Outdated
Comment on lines +757 to +758
expect(pushed.ok).toBe(true);
if (!pushed.ok) throw new Error(pushed.error.message);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Throw the typed error before asserting push success

When either new push scenario returns an error, this assertion throws before the following branch can surface the provider's typed AnalysisError, and the later new Error(message) would discard its code and details anyway; the same pattern is repeated at lines 790-791. docs/testing.md:170-174 specifically requires successful Result tests to throw the typed error before asserting the value and says a preceding .ok assertion adds no coverage, so use if (!pushed.ok) throw pushed.error before the result and limitation assertions.

AGENTS.md reference: AGENTS.md:L77-L77

Useful? React with 👍 / 👎.

@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Source fixes and publication evidence for the review findings below. Tests and executable checks were skipped at the maintainer's request. Findings that still require a decision or execution evidence remain open.

review thread

The stale exclusivity claim is removed from AdbProvider’s source documentation. Provider tests now assert the exact limitations for both available and unavailable device-side sha256sum, including the device mutation statement, so the audit covers the emitted provider evidence as well as the catalog contract. Commit 5a9d7d8 is the verified open PR head. Tests were not run.

@morluto
morluto force-pushed the fix/adb-push-not-only-mutator branch 3 times, most recently from 0611cc6 to dfef752 Compare October 13, 2026 18:39
@morluto morluto added area: runtime Process capture and runtime observation bug Something isn't working labels Oct 14, 2026
@CodesWithRobi
CodesWithRobi force-pushed the fix/adb-push-not-only-mutator branch from dfef752 to 5356022 Compare October 14, 2026 00:12
@CodesWithRobi CodesWithRobi changed the title fix(adb): drop false exclusivity from push_adb_file guidance fix(adb): drop the remaining exclusivity claim from push guidance Oct 14, 2026
@CodesWithRobi

Copy link
Copy Markdown
Contributor Author

Rebased onto main and resolved the conflict: #2990 already landed the contract-description and limitation-text change (#2602 is closed), and it also missed the AdbProvider class comment. I kept main's wording, fixed the remaining comment, squashed the review commits, and kept the regression coverage. npm run check:fast, the focused tests, and docs:check all pass.

Comment thread src/adb/AdbProvider.test.ts Resolved

@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: 5356022886

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/adb/AdbProvider.test.ts Outdated
device_digest_source: "device_sha256sum",
});
expect(pushed.value.limitations).toEqual([
"Push writes the caller's file to the device, mutating device state",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update the produced limitation text before asserting it

On every non-Windows run of src/adb/AdbProvider.test.ts, a successful push reaches AdbProvider.pushFile, which still returns "Push writes the caller's file to the device" at src/adb/AdbProvider.ts:1711 (and again at line 1733 without sha256sum), so this new exact expectation fails in both changed cases. The fresh evidence in this revision is the exact limitations assertion itself; update the producing limitation strings rather than only the tests so the advertised behavior is actually changed.

AGENTS.md reference: AGENTS.md:L25-L25

Useful? React with 👍 / 👎.

@CodesWithRobi
CodesWithRobi force-pushed the fix/adb-push-not-only-mutator branch from 5356022 to f331e53 Compare October 14, 2026 00:45
morluto added a commit that referenced this pull request Oct 14, 2026
Share tagged readiness observations, retain partial provider facts, authenticate bridge identity, bound diagnostics, and preserve cancellation and lost-session reasons. Fail closed for unparsed MIPS ABI attributes and macOS saved Hopper databases without a script-capable bridge route.

Reviewed fixes: #2010, #2108, #2513, #2695, #2731, #2771, #2828, #2867, #2868, #2870, #2880, #2919, #2945, #2961, #2981, #2998, #3000, #3002.

Validation: 285 focused source/boundary tests passed. Real Ghidra, IDA, Linux Hopper, and Windows provider runs were not repeated.

BREAKING CHANGE: MIPS targets with unresolved GNU ABI attributes and saved Hopper databases on macOS are refused rather than advertised as supported.
morluto added a commit that referenced this pull request Oct 14, 2026
Use one named input-schema projection for clients and catalog identity, preserve dialect declarations, and bound compact schema depth. Keep canonical SDK output validation when output advertisements are disabled. Release request-owned state on cancellation and carry upstream limitations through composed workflows. Preserve doctor full-output envelopes and validate navigation facts at their owner.

Reviewed fixes: #2088, #2108, #2513, #2684, #2693, #2695, #2836, #2864, #2868, #2877, #2933, #2998, #3002, #3015.

Validation: focused schema, SDK output-validation, context, and workflow tests passed; no schema dialect or canonical output validation was relaxed.
@CassieFox23

CassieFox23 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Edit: I was wrong here, so I took this pull request off tracker #3582. CodesWithRobi is right, and I checked main at b7dcf78 too. The class comment in src/adb/AdbProvider.ts still makes the exclusivity claim. Neither new test is on main. Thanks for the clear reply, and sorry for the noise.

🤖 Generated with Claude Code (Opus 5.5) 🦊

@CodesWithRobi

Copy link
Copy Markdown
Contributor Author

Thanks for the tracker. Confirming: this one still has work that is not on main, so please take it off the list.

1. The class comment is still on main. src/adb/AdbProvider.ts:530-531 still reads:

…or drives the device UI; the only device mutation is the caller-requested file push, which requires an explicit overwrite choice and verifies its transfer digest.

9630c8ff4 (#2990) changed the contract description in src/contracts/adb/adbToolContracts.ts and the two push_adb_file limitations strings, but not the class comment. This PR removes that remaining claim.

2. The tests are not on main.

  • src/contracts/toolEffects.test.ts: adds a test that fails if any tool description claims to be the only device-mutating operation, so the contract text cannot silently regain the exclusivity claim. main has no such guard.
  • src/adb/AdbProvider.test.ts: asserts the exact emitted push_adb_file limitations for both paths — device-side sha256sum verified, and sha256sum unavailable. main's only limitations assertions are for inspect_adb_window (AdbProvider.test.ts:1161, :1184, :1261).

Merge-clean against main (4135c911d), and npm run test:local -- src/adb/AdbProvider.test.ts src/contracts/toolEffects.test.ts passes (71 tests across the two files).

@morluto

morluto commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Compared this PR with main fc712b375 during the fixed/superseded backlog audit.

The earlier catalog guidance from #2602 was fixed, but main still carries the stale AdbProvider claim that push is the only device mutation. This PR's provider wording and tool-effects/limitations assertions remain useful.

Please keep the source documentation and emitted push_adb_file Evidence consistent with the actual effect catalog, including the cases with and without device-side sha256sum. The branch already records a source correction for this; this triage comment is not fresh provider execution or a claim that it is merged.

PR head reviewed: f331e53d3. This is a source comparison; no new PR-branch tests or provider runs were performed for this comment.

The push_adb_file contract text already describes the tool as
device-mutating after morluto#2990, but the AdbProvider class comment still called
the caller-requested file push the only device mutation.

Correct that comment and guard the invariant with tests: no tool contract
may claim to be the only device-mutating operation, and push_adb_file
reports its device mutation with and without device-side sha256sum
verification.

Refs morluto#2602.
@CodesWithRobi
CodesWithRobi force-pushed the fix/adb-push-not-only-mutator branch from f331e53 to 56bdd57 Compare October 23, 2026 02:13
@CodesWithRobi
CodesWithRobi marked this pull request as draft October 23, 2026 02:36
@CodesWithRobi
CodesWithRobi marked this pull request as ready for review October 23, 2026 08:55
N0zoM1z0 pushed a commit that referenced this pull request Nov 14, 2026
The push_adb_file contract text already describes the tool as
device-mutating after #2990, but the AdbProvider class comment still called
the caller-requested file push the only device mutation.

Correct that comment and guard the invariant with tests: no tool contract
may claim to be the only device-mutating operation, and push_adb_file
reports its device mutation with and without device-side sha256sum
verification.

Refs #2602.

Supersedes #2868 (follow-up to #2602)

Co-Authored-By: gensokyo-dev <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@N0zoM1z0

Copy link
Copy Markdown
Collaborator

Thanks! This landed on main in #10490 as its own commit, cherry-picked with your authorship kept (rebase merge). Closing in favor of that merge.

@N0zoM1z0 N0zoM1z0 closed this Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(adb): remove false exclusivity from the push-file description

4 participants