Repository navigation
Conversation
… Linear order Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Record main-only settings bug and leave the acceptance consolidation census for step 0.5. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Fail-closed checker —
mobile/scripts/rpc-foundation-check.mtsimplements the fullstep0flag contract, regenerating and deep-comparing each artifact in--checkmode;step0_5/step1/step2/step3validate flag names and exit 2 as unimplemented, and the lane-B flags fail unless--allow-lane-b-deferredis passed. - Access resolution engine —
rpc-access-resolution.mtsfollows aliases, destructuring, bracket constants, bound senders and forwarder callers through the TS compiler API, failing closed on unresolved/dynamic calls (1,613 references across 291 files). - Artifact generators —
rpc-support-floor.mts(floors derived from protocol constants and git tags),rpc-slice-manifest.mts(settings slice pinned to PR #19675),rpc-native-inventory.mts,rpc-acceptance-census.mts, plus sharedrpc-artifact-io.mts--check/emit plumbing. - Regression seeds + ratchet — b1/b2/b3 seeds that pass on main and fail against the pinned
bcba08b3e4adapter sources, with provenance innamed-deltas.json/regression-seeds.json/reference-regressions.json;screen-rpc-ratchet.test.tspins the 155-file/413-hit baseline. - Sole source edit —
use-mobile-git-requests.tsroutes throughmobileGitOperationDescriptors[method]?.method ?? method(23 descriptor records), an identity transform today that preserves method, params and response handling.
ℹ️ The fail-closed checker is not enforced anywhere
No CI workflow is changed in this PR, so pnpm --dir mobile rpc-foundation:check runs only by hand. It also shells out to git show/git tag/git rev-parse on historical SHAs, which needs a non-shallow clone with tags. If step 0 is meant to gate the later steps, the enforcement path (and the clone depth it runs on) is still open.
ℹ️ The screen ratchet pins token counts, not call sites
RPC_ENTRY_POINT (\bsendRequest\b …) matches declarations, type references and comments as well as real calls, so the 413 pinned hits are lexical occurrences rather than semantic RPC call sites. Future churn — a rename, a new comment, a refactor that moves sendRequest into a helper — will move the counts without any real RPC change. Worth confirming that noise level is acceptable before it becomes merge-blocking for unrelated mobile work.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughAdds a mobile RPC foundation check command and supporting artifacts. The change adds TypeScript RPC access resolution, call-site inventory generation, native source inventory generation, and inline RPC ratchet tests. The Step 0 checker validates Git provenance, generated artifacts, regression seeds, and Vitest JSON results. Reference probes execute historical code for three regression cases. Focused tests cover stale file-search responses, merge results, comments transport errors, and resolver behavior. Merge Risk: 🟡 Moderate · up to This change does not alter product behavior, but its foundation checker can still accept incomplete or misleading RPC and regression evidence. The validation gaps should be addressed before relying on the checker as the contract baseline. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description provides detailed scope, rationale, implementation details, testing results, limitations, and merge conditions. However, it omits required template sections, including the linked issue with a Resolution Add the missing template sections and complete the required information. Include a valid Full details: Docstring CoverageExplanation Docstring coverage is 15.15% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 33 functions across 17 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: b671fd6b-4c18-4d44-a9cb-020c88328f2d
📒 Files selected for processing (26)
mobile/package.jsonmobile/rpc-foundation/STEP0_5-TODO.mdmobile/rpc-foundation/access-inventory.jsonmobile/rpc-foundation/named-deltas.jsonmobile/rpc-foundation/native-rpc-inventory.jsonmobile/rpc-foundation/reference-regressions.jsonmobile/rpc-foundation/regression-seeds.jsonmobile/rpc-foundation/settings-19675.jsonmobile/rpc-foundation/support-floor.jsonmobile/scripts/rpc-acceptance-census.mtsmobile/scripts/rpc-access-inventory.mtsmobile/scripts/rpc-access-resolution.mtsmobile/scripts/rpc-artifact-io.mtsmobile/scripts/rpc-foundation-check.mtsmobile/scripts/rpc-native-inventory.mtsmobile/scripts/rpc-reference-regressions.mtsmobile/scripts/rpc-slice-manifest.mtsmobile/scripts/rpc-support-floor.mtsmobile/src/session/use-mobile-native-chat-file-search.test.tsmobile/src/source-control/mobile-git-operation-descriptors.tsmobile/src/source-control/use-mobile-git-requests.tsmobile/src/tasks/use-mobile-tasks-item-detail-loading.test.tsmobile/src/tasks/use-mobile-tasks-project-file-merge-actions.test.tsmobile/src/transport/rpc-access-resolution.test.tsmobile/src/transport/rpc-operation-descriptor.tsmobile/src/transport/screen-rpc-ratchet.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
| if (!Array.isArray(ledger.entries) || ledger.entries.length < 7) { | ||
| throw new Error('Incomplete named deltas') |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Validate required delta IDs and reject duplicate IDs.
The length check does not prove that the ledger contains each required named delta. A ledger with seven copies of one valid entry passes this check and the later shape checks.
Check the required ID set and ID uniqueness before the checker reports success.
Proposed validation
- if (!Array.isArray(ledger.entries) || ledger.entries.length < 7) {
+ const requiredDeltaIds = [
+ 'retired-names-refused-read',
+ 'linear-select-workspace-refusal',
+ 'malformed-error-operation-name',
+ 'stop-ref-layout-effect',
+ 'b1-stale-files-inventory',
+ 'b2-null-project-mutation',
+ 'b3-linear-settlement-order'
+ ]
+ const deltaIds = new Set(
+ Array.isArray(ledger.entries) ? ledger.entries.map((entry: { id?: string }) => entry.id) : []
+ )
+ if (
+ !Array.isArray(ledger.entries) ||
+ deltaIds.size !== ledger.entries.length ||
+ requiredDeltaIds.some((id) => !deltaIds.has(id))
+ ) {
throw new Error('Incomplete named deltas')
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if (!Array.isArray(ledger.entries) || ledger.entries.length < 7) { | |
| throw new Error('Incomplete named deltas') | |
| const requiredDeltaIds = [ | |
| 'retired-names-refused-read', | |
| 'linear-select-workspace-refusal', | |
| 'malformed-error-operation-name', | |
| 'stop-ref-layout-effect', | |
| 'b1-stale-files-inventory', | |
| 'b2-null-project-mutation', | |
| 'b3-linear-settlement-order' | |
| ] | |
| const deltaIds = new Set( | |
| Array.isArray(ledger.entries) ? ledger.entries.map((entry: { id?: string }) => entry.id) : [] | |
| ) | |
| if ( | |
| !Array.isArray(ledger.entries) || | |
| deltaIds.size !== ledger.entries.length || | |
| requiredDeltaIds.some((id) => !deltaIds.has(id)) | |
| ) { | |
| throw new Error('Incomplete named deltas') |
| const tags = ( | ||
| await git( | ||
| 'tag', | ||
| '--list', | ||
| 'v*', | ||
| 'mobile-v*', | ||
| 'mobile-ios-v*', | ||
| 'mobile-android-v*', | ||
| '--sort=version:refname' | ||
| ) | ||
| ).split('\n') | ||
| const namespaces = [ | ||
| { | ||
| name: 'desktop-stable', | ||
| pattern: /^v\d+\.\d+\.\d+$/, | ||
| file: desktopPath, | ||
| protocol: 'RUNTIME_PROTOCOL_VERSION', | ||
| minimum: mobile.MIN_COMPATIBLE_DESKTOP_VERSION | ||
| }, | ||
| { | ||
| name: 'desktop-rc', | ||
| pattern: /^v\d+\.\d+\.\d+-rc(?:[.-]?\d+)?$/, | ||
| file: desktopPath, | ||
| protocol: 'RUNTIME_PROTOCOL_VERSION', | ||
| minimum: mobile.MIN_COMPATIBLE_DESKTOP_VERSION | ||
| }, | ||
| ...['mobile-v', 'mobile-ios-v', 'mobile-android-v'].map((prefix) => ({ | ||
| name: `${prefix}*`, | ||
| pattern: new RegExp(`^${prefix}\\d+\\.\\d+\\.\\d+(?:-rc[.-]?\\d+)?$`), | ||
| file: mobilePath, | ||
| protocol: 'MOBILE_PROTOCOL_VERSION', | ||
| minimum: desktop.MIN_COMPATIBLE_RUNTIME_CLIENT_VERSION | ||
| })) | ||
| ] | ||
| const floors = [] | ||
| for (const namespace of namespaces) { | ||
| const candidates = tags.filter((tag) => namespace.pattern.test(tag)) | ||
| if (!candidates.length) { | ||
| throw new Error(`No tags for ${namespace.name}`) | ||
| } | ||
| const inspected = [] | ||
| let floor: unknown, atMinimum3: unknown | ||
| for (const tag of candidates) { | ||
| const sha = await git('rev-parse', `${tag}^{commit}`) | ||
| let source: string | ||
| try { | ||
| source = await git('show', `${sha}:${namespace.file}`) | ||
| } catch { | ||
| inspected.push({ tag, sha, excluded: 'protocol constant file absent' }) | ||
| continue | ||
| } | ||
| const values = constants(source) | ||
| const version = values[namespace.protocol] ?? values.DESKTOP_PROTOCOL_VERSION | ||
| if (!Number.isInteger(version)) { | ||
| throw new Error(`Missing protocol at ${tag}:${namespace.file}`) | ||
| } | ||
| const peerMinimum = | ||
| namespace.file === desktopPath | ||
| ? (values.MIN_COMPATIBLE_RUNTIME_CLIENT_VERSION ?? values.MIN_COMPATIBLE_MOBILE_VERSION) | ||
| : values.MIN_COMPATIBLE_DESKTOP_VERSION | ||
| if (!Number.isInteger(peerMinimum)) { | ||
| throw new Error(`Missing peer minimum at ${tag}`) | ||
| } | ||
| const clientProtocol = | ||
| namespace.file === desktopPath | ||
| ? mobile.MOBILE_PROTOCOL_VERSION | ||
| : desktop.RUNTIME_PROTOCOL_VERSION | ||
| const evidence = { | ||
| tag, | ||
| sha, | ||
| protocol: version, | ||
| peerMinimum, | ||
| protocolConstant: | ||
| values[namespace.protocol] === undefined ? 'DESKTOP_PROTOCOL_VERSION' : namespace.protocol | ||
| } | ||
| inspected.push(evidence) | ||
| if (!floor && version >= namespace.minimum && clientProtocol >= peerMinimum) { | ||
| floor = evidence | ||
| } | ||
| if (!atMinimum3 && version >= 3 && clientProtocol >= peerMinimum) { | ||
| atMinimum3 = evidence | ||
| } | ||
| if (floor && atMinimum3) { | ||
| break | ||
| } | ||
| } | ||
| if (!floor || !atMinimum3) { | ||
| throw new Error(`No compatible floor in ${namespace.name}`) | ||
| } | ||
| floors.push({ | ||
| namespace: namespace.name, | ||
| consideredTags: candidates, | ||
| minimum: namespace.minimum, | ||
| floor, | ||
| atMinimum3, | ||
| inspected | ||
| }) | ||
| } |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Select the desktop RC floor by release chronology. The Step 0 generator sorts tags by version:refname and stops after recording v0.0.1-rc.0. That tag was released on 2026-05-26, while the earlier v1.4.5-rc.0 release from 2026-05-17 already has compatible protocol values. The emitted desktop-rc floor can therefore omit the chronologically oldest compatible RC and misstate retirement support. Sort and validate candidates by release chronology before emitting the floor.
…lved provenance Review of #19833 found the fail-closed claim did not hold. Each gate below was reproduced failing open first, then fixed and re-proved. The b2 seed pinned a V8 TypeError message rather than a guard: `toMatch(/null/)` matched "Cannot read properties of null (reading 'ok')", so adding the correct null guard would have made the seed fail and `result: undefined` was uncovered. The oracle is now the outcome — the row is not committed and a non-empty error is surfaced — which still fails against the pinned reference at bcba08b (`response.result?.ok === false` silently accepts and commits) and passes under an explicit guard. A second case covers `undefined`. The ledger's b2 provenance pointed at line 149, inside the sibling review-comment function; the merge path is line 220. `--require-regressions` shelled out to `vitest -t <name>` and trusted the exit code. A filter matching nothing and an `it.skip` are both a green skip, so a retitled or skipped seed kept the gate green. The runs now read the JSON reporter and require the named case itself to report `passed`; the ratchet run requires every case in the file to pass. The named-deltas ledger was shape-validated only, so fabricated shas, absent files and line 999999 passed. Every provenance pointer is now resolved with `git show <sha>:<file>` and must be at least `line` lines long; any git failure or truncated read is a gate failure. `rpc-acceptance-census.mts` had a `--check` branch nothing invoked, so the 415-line STEP0_5-TODO.md could drift silently. step0 now drives it like the other five generators, and the census honours `--output`. Ratchet and census exclusions matched `test-support` anywhere in the path, which would have made lane C's `mobile/src/test-support/rpc-recording/` permanently unwatched and let out any product file whose name contained the string. Both are anchored to a path segment or the `.test-support` suffix; the watched file set is unchanged. The caller walk carried a hardcoded rescue for one file and one parameter name. A caller reached only through a function-type alias was otherwise dropped, and a partial caller set resolving to one literal was indistinguishable from a static call. The rescue is replaced by a general contextual-alias rule with fixtures for both the annotated-variable and shorthand-property shapes; the inventory is byte-identical apart from the rewritten seed's own references. Artifact honesty: support-floor records considered versus inspected counts and the floor commit dates, and states that a floor is the lowest version-named compatible tag rather than the oldest supported release, since the rc floor v0.0.1-rc.0 is thirteen days newer than the stable floor v1.3.51. Its `git show` catch no longer launders a truncation into "protocol constant file absent". access-inventory records that 1,182 `role: reference` entries are exempt by construction and that 44 dynamic call sites are the resolved ones, and that a transport-exception method union is an over-approximation. No product behavior changes. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Fail-closed regression execution —
rpc-foundation-check.mtsgained avitesthelper that parses the JSON report and requires the pinned seed (or every case, for the ratchet) to reportpassed, so a-tfilter matching nothing or anit.skipcan no longer pass as green. - Fail-closed provenance —
gitLineCountresolves each ledgersha:fileand rejects any location past the file's end, closing the earlier shape-only check; thegit showcatch inrpc-support-floor.mtsnow only treats a genuinely-absent path as an exclusion. - Generalized alias resolution — the hardcoded
StructuredAgentSessionMutatespecial case was replaced byaliasCarriers/ownerBinding, which follow a function value through contextual type-alias assignments; two new resolver tests cover the type-alias and shorthand-property paths. - Support-floor provenance — added committer timestamps and
consideredCount/inspectedCount, and clarified theselectionsemantics (lowest-named compatible tag, not oldest release). - Anchored
test-supportexclusion —NOT_SOURCEin both the acceptance census and the screen ratchet now anchorstest-supportto a path segment or suffix, so a product file whose path merely containstest-supportis no longer silently unwatched. - Acceptance census gated —
step0now regenerates and checksSTEP0_5-TODO.mdunconditionally. - b2 seed hardening — the Project-merge seed was refactored into
projectMergeProbe/expectRejectedand gained anundefinedresult variant, with the oracle expressed as the outcome rather than the error message.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 5
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 8a78141d-209d-4698-b777-eb5f34c26ba5
📒 Files selected for processing (11)
mobile/rpc-foundation/access-inventory.jsonmobile/rpc-foundation/named-deltas.jsonmobile/rpc-foundation/support-floor.jsonmobile/scripts/rpc-acceptance-census.mtsmobile/scripts/rpc-access-inventory.mtsmobile/scripts/rpc-access-resolution.mtsmobile/scripts/rpc-foundation-check.mtsmobile/scripts/rpc-support-floor.mtsmobile/src/tasks/use-mobile-tasks-project-file-merge-actions.test.tsmobile/src/transport/rpc-access-resolution.test.tsmobile/src/transport/screen-rpc-ratchet.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- mobile/rpc-foundation/named-deltas.json
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.
| const aliased = calls.filter((call) => { | ||
| const declaration = checker.getResolvedSignature(call)?.declaration | ||
| return Boolean(declaration?.parent && aliases.has(declaration.parent)) | ||
| }) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Match aliased calls to their carrier binding.
When two bindings use the same RunHook alias, callers(owner) accepts calls through both bindings because it checks only the alias declaration. The unrelated call then reaches methods() for the RPC forwarder and adds its method literal to the caller-resolved entry emitted by rpc-access-inventory.mts. Match the call target to the owner binding as well as the alias, and add a regression test with two distinct bindings.
| args: ['show', `${sha}:${file}`], | ||
| cwd: root, | ||
| maxOutputBytes: 8_000_000 | ||
| }) | ||
| if (result.code !== 0 || result.timedOut || result.outputTruncated) { | ||
| throw new Error(`Unresolvable provenance ${sha}:${file}: ${result.stderr.trim()}`) | ||
| } | ||
| return result.stdout.replace(/\n$/, '').split('\n').length |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Require provenance paths to resolve to non-empty blobs.
git show <sha>:<path> succeeds for tree paths and returns a directory listing. That output can satisfy the line-count check. An empty blob also produces one line because ''.split('\n').length is 1. Use git cat-file -t to require a blob, and return 0 for empty blob content.
Proposed validation
async function gitLineCount(sha: string, file: string): Promise<number> {
+ const object = `${sha}:${file}`
+ const type = await runProcess({
+ program: 'git',
+ args: ['cat-file', '-t', object],
+ cwd: root
+ })
+ if (type.code !== 0 || type.stdout.trim() !== 'blob') {
+ throw new Error(`Provenance is not a blob: ${object}`)
+ }
const result = await runProcess({
program: 'git',
- args: ['show', `${sha}:${file}`],
+ args: ['show', object],
cwd: root,
maxOutputBytes: 8_000_000
})
if (result.code !== 0 || result.timedOut || result.outputTruncated) {
throw new Error(`Unresolvable provenance ${sha}:${file}: ${result.stderr.trim()}`)
}
- return result.stdout.replace(/\n$/, '').split('\n').length
+ return result.stdout === '' ? 0 : result.stdout.replace(/\n$/, '').split('\n').length
}| const cases: VitestCase[] = (summary.testResults ?? []).flatMap( | ||
| (suite: { assertionResults?: VitestCase[] }) => suite.assertionResults ?? [] | ||
| ) | ||
| const matched = name ? cases.filter((item) => item.fullName.includes(name)) : cases |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🌐 Web query:
For Vitest 4.1.11 JSON reporter output, what fields identify an assertion's exact test title and full suite-qualified name?
💡 Result:
In the Vitest 4.1.11 JSON reporter output, the fields that identify an assertion's exact test title and its full suite-qualified name are as follows: * title: Contains the individual, exact test title (the name passed to the test function) [1][2]. * fullName: Contains the full, suite-qualified name [1][2]. In recent versions of Vitest, this field is constructed by joining the suite hierarchy and the test name, typically separated by a > character (e.g., "suite > nested suite > test name") [1][3]. Additionally, the ancestorTitles field is available as an array of strings representing the hierarchy of describe blocks that contain the test [1][2]. Note that while the fullName format in Vitest's JSON reporter has transitioned in recent major versions to use a > separator to improve consistency and filtering behavior (such as with the --testNamePattern flag), older versions or specific configurations might have used different spacing [1]. You should rely on the fullName field for uniquely identifying the test within the suite tree [1].
Citations:
- 1: https://qaskills.sh/blog/vitest-4-json-reporter-changelog-guide
- 2: https://tangled.org/vitest.dev/vitest/blob/b77de968ecdc978e54d32926198f25a13bde9441/packages/vitest/src/node/reporters/json.ts
- 3: vitest-dev/vitest@bcccce6df
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- target file ---'
sed -n '1,210p' mobile/scripts/rpc-foundation-check.mts
printf '%s\n' '--- Vitest references and version declarations ---'
rg -n --glob '!node_modules' --glob '!dist' 'vitest|fullName|assertionResults|rpc-foundation-check' mobile package.json pnpm-lock.yaml yarn.lock package-lock.json 2>/dev/null | head -240Repository: stablyai/orca
Length of output: 30595
🤖 get_repo_knowledge executed:
get_repo_knowledge stablyai/orca /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/learnings
Length of output: 26292
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- vitest call sites and pinned names ---'
rg -n -C 4 'vitest\(|--require-regressions|regression-seeds|testNamePattern|fullName' mobile/scripts mobile/rpc-foundation 2>/dev/null | head -240Repository: stablyai/orca
Length of output: 5053
Match the pinned test name exactly.
cases.filter((item) => item.fullName.includes(name)) can accept a different test whose full name contains the pinned name. Compare the exact normalized fullName with the pinned name, or compare Vitest's exact title and suite path.
| ) { | ||
| throw new Error(`Invalid ${side} provenance: ${entry.id}`) | ||
| } | ||
| if ((await gitLineCount(location.sha, location.file)) < location.line) { | ||
| throw new Error( | ||
| `${side} provenance past end of file: ${entry.id} ${location.file}:${location.line}` | ||
| ) | ||
| } | ||
| } | ||
| } | ||
| if (flags.has('require-all-current-calls') || flags.has('require-no-dynamic-calls')) { |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Compare Step 0 with the complete expected delta-ID set. named-deltas.json currently contains eight IDs, but checkStep0() only rejects fewer than seven entries. If one entry is removed, the remaining seven valid entries pass the ledger validation and the missing historical delta is no longer enforced. Add a checked-in expected ID set and compare the ledger IDs and count against it at this boundary.
Deletes 26,623 of the branch's 28,703 added lines. Nothing here changed product
behavior, and most of it guarded facts that were already written down or were
provably constant.
`support-floor.json` + its generator (2,496 lines): walked 1,078 tags and read
205 blobs to name five floors, three of which are just the oldest tag in their
namespace and one of which the artifact itself says not to read as a support
floor. Every namespace recorded `"minimum": 2`, so the bump to 3 would have
falsified every `floor` field. The only surviving field, `atMinimum3`, yields the
four strings already hand-written at protocol-version.ts:19-24. That comment is
the artifact. `--require-floor-derived-from-protocol-gate` and
`--require-retirement-decision` go with it.
`settings-19675.json` + the slice manifest (2,257 lines): a frozen AST inventory
pinned to `dc423947f4`, a head in no branch here. `--slice` and `--pr-head` go
with it.
`rpc-operation-descriptor.ts` + `mobile-git-operation-descriptors.ts` (51
lines): `defineRpcOperation` returned its argument, all 23 table entries mapped
their key to itself, all 23 policies were the literal `'unclassified'`, and the
sole consumer `descriptors[method]?.method ?? method` evaluated to `method` for
every input. The original `client.sendRequest(method, {...})` is restored
byte-for-byte from the base.
`rpc-acceptance-census.mts` + `STEP0_5-TODO.md` (474 lines): a scratch to-do
list whose freshness step0 enforced unconditionally, so any new `if
(response.ok)` in `mobile/src` broke the gate until someone regenerated it.
The unimplemented step contracts (22 flag names across `step0_5`/`step1`/
`step2`/`step3`) declared flags for migrations that have not happened; the code
printed "not implemented" and exited 2. Also gone are
`--require-gate-fail-closed`, `--require-below-floor-block-e2e` and
`--allow-lane-b-deferred`, three flags whose only behavior was requiring each
other.
`access-inventory.json` drops from 21,805 to 618 lines. 1,183 of its 1,614
entries were role `reference` — occurrences of the `sendRequest`/`subscribe`
token with no call attached, which the artifact's own summary conceded are
exempt by construction. Those become a count plus the 167-file list. The 431
real call sites stay, one per line as `file:line:column kind method`, which is
greppable in a way a 14-line object row was not. `--require-no-dynamic-calls`
and its exemption descriptors go: `transport-exception` was a 194-method union
the artifact called an over-approximation, and `non-rpc-listener` was two
hardcoded file paths. What remains is the checker's own resolution output.
Removing the descriptor table improved the census rather than degrading it. The
git call site now resolves through the type checker to the six literals its
in-file callers pass, where the hand table asserted 23. It is an
under-approximation — `callers()` misses the callers that reach `sendGitRequest`
through the `SendGitRequest` type alias — so read `resolvedFamily` as a lower
bound, not a closed set.
Verified `--require-all-current-calls` still fails closed in both directions:
dropping one row from a copy of the artifact, and adding a real
`client.sendRequest('proof.newCallSite')` to `mobile-open-pr-prefill.ts`, each
exit 1 with `Stale artifact`.
Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Removed speculative machinery — deleted
rpc-support-floor.mts/support-floor.json,rpc-slice-manifest.mts/settings-19675.json,rpc-acceptance-census.mts/STEP0_5-TODO.md, and the operation-descriptor table (rpc-operation-descriptor.ts,mobile-git-operation-descriptors.ts), restoringuse-mobile-git-requests.tsto the baseclient.sendRequest(method, {...})call byte-for-byte. - Simplified access inventory —
rpc-access-inventory.mtsnow emits 431 greppablefile:line:column kind methodcall-site rows plus a 1,183-reference count and 167-file list (schema v2), dropping--require-no-dynamic-callsand its exemption descriptors. - Reduced checker surface —
rpc-foundation-check.mtsnow accepts onlystep0, deleting the unimplementedstep0_5/step1/step2/step3flag contracts and the lane-B flag trio.
ℹ️ PR description is out of sync with the code
The "What lands", "Derived floors", and "Passing invocation" sections still describe the removed support-floor manifest, settings slice, --require-no-dynamic-calls, and the lane-B flags. The documented "Passing invocation" command now fails at flag parsing (Unknown or duplicate flag: --require-no-dynamic-calls), so a reviewer following the body cannot actually verify the checker. Worth regenerating the hand-written sections.
ℹ️ resolvedFamily is a lower bound, but only the commit message says so
Removing the 23-entry descriptor table means the git call site now resolves through the type checker to the six literals its in-file callers pass (git.commit|git.fetch|git.pull|git.push|git.status|git.upstreamStatus); callers reached via the SendGitRequest type alias (e.g. git.rebaseFromBase, git.localBranches) are missed. That's a reasonable step-0 trade and the commit message documents it, but the caveat lives only there — a future maintainer reading access-inventory.json's note may treat a |-joined family as exhaustive.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…cannot leave CI red `emit` wrote `JSON.stringify(value, null, 2)` while `format:check` runs oxfmt over the same committed bytes, so the short `scope` array failed the gate. The generator now formats what it writes; `--check` compares parsed JSON and is unaffected. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
ℹ️ No critical issues — one minor cross-platform suggestion inline.
Reviewed changes
- Formats regenerated artifacts —
emitinrpc-artifact-io.mtsbecameasyncand now runsoxfmt --writeon the emitted JSON before reporting success, so regeneration cannot leave aformat:checkCI job red; the three generators nowawaitit. - Normalized committed inventory JSON —
access-inventory.json'sscopearray collapsed to a single line to match oxfmt's output.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Reject partial caller families when sender bindings escape or alias calls are not enumerated. Inventory unsubscribe frame constructions and sender calls as a separate kind, and pin the failure modes with mutation-checked regressions. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Fail-closed forwarder resolution —
callers()inrpc-access-resolution.mtsnow returns the empty set unless every use of a function-value binding is a direct call or a fully-enumerated local alias (escapes()walks a newreferencesmap of every identifier use). Escaped senders (use-mobile-git-requests.ts,use-mobile-browser-request.ts,mobile-structured-agent-session-rpc.ts) now reportdynamic:client.sendRequestinstead of a silently-partial|-joined family, and the artifactnotenow documentsdynamic:<callee>as "completeness cannot be proven" — closing the earlier lower-bound caveat. unsubscribeaccess kind —entryKindrecognizessendUnsubscribe, and the newunsubscribeFrameMethodinventories literal*.unsubscribeframe method fields as a third kind, recomputingaccess-inventory.json(442 call sites, 1184 references, 23 resolved families).- Cross-platform regeneration —
emitformats regenerated artifacts viapnpm exec oxfmtfrommobile/rather than spawning the extensionless POSIX shim, so the Windows regeneration path no longer relies on.bin/oxfmt.
The new escapes() cases (returned hook results, consumed senders, object assignment, alias chains) are each pinned by rpc-access-resolution.test.ts, and the resolver change is a behavior-correctness hardening for the step-0 inventory with no product-code surface.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Closing as superseded, unmerged by the owner's decision. The inventory this PR introduced as a manifest lives on as |

Summary
Step 0 of the mobile RPC contract foundation: the inventory, manifests, regression seeds and read-only checker the later steps are gated on. No product behavior changes. The only source edit is the git request path, which keeps its original method, params and response handling and gains 23 literal descriptor records.
What lands
mobile/scripts/rpc-foundation-check.mts(scriptpnpm --dir mobile rpc-foundation:check). Implements the fullstep0flag contract and fails closed on any missing, stale or incomplete artifact.step0_5/step1/step2/step3validate their flag names and exit 2 as unimplemented. The two lane B checks (--require-gate-fail-closed,--require-below-floor-block-e2e) fail unless--allow-lane-b-deferredis passed; drop that flag once feat(mobile): retire protocol-2 pairings and fail closed on unverified host compatibility #19821 merges.DESKTOP_PROTOCOL_VERSIONalias handling, source SHAs, both compatibility directions, and the owner's retirement decision recorded verbatim. Tags with no protocol constant file are recorded as excluded with their SHAs instead of being assigned an invented protocol.new-workspace-runtime-context-null-settings-typeerror, found by lane C's reply matrix and left unfixed by design.bcba08b3e4adapter sources.dc423947f4: 45 records, 35 recordable host RPC, 10 non-recordable device preferences.prDiffBaseandmainBaselineare distinct fields.requireSuccessdefinitions and 403 candidate predicate expressions, each with file:line.Derived floors
This branch keeps all three minimums at 2; #19821 moves them. Regenerate
support-floor.jsonafter that merges.Passing invocation
Verified by the lead on the committed tree:
step0: all requested checks passed.Gates
pnpm --dir mobile typecheckpnpm --dir mobile test(full)oxfmt --checkon 26 changed filescheck:code-quality:changedcheck:react-doctor:changedRoot
pnpm tcis not applicable: nothing outsidemobile/changed. The.mtsscripts, which mobile's normal include globs exclude, were typechecked directly and exit 0.Limits
Step 0.5 policy consolidation is not implemented; see
STEP0_5-TODO.md. Steps 1 to 3 are stubs. Settings scenario ids are planned, not executed coverage, and the manifest's consumed-fields are conservative enclosing-function expressions, so they are inventory evidence rather than approved reader definitions. The native census reads checked-in code and ABI declarations; it is not a runtime test.Plan of record: mobile RPC contract foundation v7. Merge after #19821.