Skip to content

fix: classify protobuf decode failures as protocol - #1

Closed
nichinichisou0609 wants to merge 1 commit into
mainfrom
maintenance/api-protocol-errors-20261001
Closed

nichinichisou0609 wants to merge 1 commit into
mainfrom
maintenance/api-protocol-errors-20261001

Conversation

@nichinichisou0609

@nichinichisou0609 nichinichisou0609 commented Sep 30, 2026 •

Copy link
Copy Markdown

Malformed protobuf payloads in valid gRPC frames were reported as transport for client queries and JP profile-card CDN Version discovery. Classify these local decode failures as protocol while retaining HTTP 502, business-code priority and redacted errors. Classification uses the typed prost::DecodeError source instead of trusting remote status text.

Adds four loopback mock regressions for malformed payloads, misleading remote status text, initial business-code precedence and the public HTTP image error. The change is limited to error classification and regression coverage; dependencies and the frozen OpenAPI schema are unchanged.

Validation

The submitted commit is f44bbf227d21798fb03c9777aeed680d737db3df, based on d094de568c570889b318e9490574da678fddf26d.

On Unix with Rust 1.98.1, locked/offline dependencies and a single build job/test thread:

  • 157 Rust all-target tests passed, 0 failed, 0 ignored.
  • 2 doctests and 7 Python release-script tests passed.
  • cargo fmt --all --check, all-target Clippy with -D warnings, the normal workspace debug build and Rust documentation generation passed.
  • The tested tree matched all 98 tracked Git blobs. Both malformed-response regressions failed before the production fix and passed afterward.

GitHub Actions run 36783108804 completed successfully on the submitted commit: the test job (including Docker exported-input validation) and native amd64/arm64 image builds with offline container smoke tests all passed. Image publication and the release job were skipped for this PR.

Existing Windows limitations

Earlier native Windows runs had five existing InvalidConfig failures at private-file/inline-secret permission boundaries. Windows ACL-based secret saving is not implemented. This change preserves those boundaries and does not claim that the Windows suite is all green. The final Unix suite passes all five cases.

  • jp::tests::existing_output_prevents_registration_and_import_cas_rejects_stale_generation
  • jp::tests::saved_registration_without_device_id_is_imported_without_network
  • jp::tests::version_registration_persistence_and_override_are_explicit
  • server/tests/regions.rs: relative_config_path_resolves_each_source_once
  • server/tests/regions.rs: separate_runtime_credentials_and_relative_paths_do_not_inherit

The earlier Windows runs preceded the last business-priority regression: client 43 passed/3 failed, server lib 51 passed, path routes 6 passed, regions 3 passed/2 failed. Final native formatting passed.

Local validation limits

Live production/game/CDN integration, Docker exported-input/image smoke validation and optimized release builds were not run locally. All exercised game traffic used synthetic loopback mocks; no production writes, deployment or release was performed. Hosted CI additionally passed the Docker checks recorded above.

Identify local decoder failures by their typed source, preserve business-code priority, and keep query and JP image errors redacted.
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