Skip to content

[codex] Fix Firestore GetQueryNamed runtime drift#112

Merged
AdamEssenmacher merged 1 commit intomainfrom
codex/runtime-drift-cloudfirestore-getquerynamed
Apr 10, 2026
Merged

[codex] Fix Firestore GetQueryNamed runtime drift#112
AdamEssenmacher merged 1 commit intomainfrom
codex/runtime-drift-cloudfirestore-getquerynamed

Conversation

@AdamEssenmacher
Copy link
Copy Markdown
Owner

Summary

This PR starts the runtime-failure drift remediation loop with the first concrete case: cloudfirestore-getquerynamed.

It does three things:

  • fixes the Firestore binding for getQueryNamed:completion: so it binds NSString as string instead of NSInputStream
  • adds a reusable targeted E2E mode (--runtime-drift-case <id>) for one drift case at a time
  • adds a checked-in backlog and case manifest so future runtime-failure drifts can follow the same proof/fix/verify pattern

Runtime failure proof before the fix

I first ran the new targeted lane against the unfixed binding locally:

tools/e2e/run-firebase-foundation.sh --package-dir output --configuration Debug --runtime-drift-case cloudfirestore-getquerynamed

That produced the expected binding-layer failure proof in:

  • tests/E2E/Firebase.Foundation/artifacts/firebase-foundation-result-cloudfirestore-getquerynamed-failure.json
  • tests/E2E/Firebase.Foundation/artifacts/firebase-foundation-sim-cloudfirestore-getquerynamed-failure.log

The captured evidence was:

  • selector: getQueryNamed:completion:
  • runtime argument type: Foundation.NSInputStream
  • managed exception: ObjCRuntime.ObjCException
  • native exception: NSInvalidArgumentException
  • native reason: -[__NSCFInputStream length]: unrecognized selector sent to instance ...

Fix and regression validation

After fixing the binding, I reran the same targeted lane and it passed:

  • tests/E2E/Firebase.Foundation/artifacts/firebase-foundation-result-cloudfirestore-getquerynamed-success.json
  • tests/E2E/Firebase.Foundation/artifacts/firebase-foundation-sim-cloudfirestore-getquerynamed-success.log

The success result shows:

  • selector getQueryNamed:completion: completed without ObjCException
  • runtime argument type: System.String
  • callback invoked: True
  • returned query was null for the unknown named query: True

I also reran the default smoke lane to ensure the new targeted-mode plumbing did not break the ordinary E2E harness.

Validation

Commands used locally:

dotnet tool restore
dotnet pack source/Firebase/CloudFirestore/CloudFirestore.csproj --configuration Release --output output
tools/e2e/run-firebase-foundation.sh --package-dir output --configuration Debug --runtime-drift-case cloudfirestore-getquerynamed
tools/e2e/run-firebase-foundation.sh --package-dir output --configuration Debug

Notes

  • The backlog entry stays under Ready in this PR and should move to Done only after merge, per the loop rules.
  • This PR is intentionally scoped to one runtime-failure drift plus the reusable harness needed to repeat the process.

@AdamEssenmacher
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

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: 9366c6d482

ℹ️ 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 tests/E2E/Firebase.Foundation/README.md
@AdamEssenmacher AdamEssenmacher merged commit 3077a53 into main Apr 10, 2026
1 check passed
@AdamEssenmacher AdamEssenmacher deleted the codex/runtime-drift-cloudfirestore-getquerynamed branch April 10, 2026 04:52
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