Skip to content

BUZZ-517: Prepare mobile auth requirement discovery - #8984

Closed
bradseiler wants to merge 5 commits into
mainfrom
seiler/BUZZ-517/required-auth-guidance
Closed

bradseiler wants to merge 5 commits into
mainfrom
seiler/BUZZ-517/required-auth-guidance

Conversation

@bradseiler

@bradseiler bradseiler commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Prepare a mobile parser for a community's public sign-in requirement. It separates the explicit requires_nip_fi policy from federated-identity capability and protocol compatibility. Discovery sends no credentials, follows no redirects, and bounds the response.

This draft has no runtime caller or upgrade screen. It remains a parser-only preparation under the existing scope disposition. #9033 contains the requested old-desktop screen and public builderlab.xyz download action. This PR does not satisfy that desktop request.

Related issue

BUZZ-517. Producer #8988 owns the requirement field and effective relay policy. Fixtures remain pinned to producer d3ae4935b11e207f0736833cd5220f207be359fd; its required-under-Off fixture predates the corrected policy and must be refreshed from the merged producer. No relay implementation changes are included here.

Testing

Rebased onto main af54258f19ac32667c027f889652bdeb479c8e13, including BUZZ-510, and published as 5e9dfb00f0952ee6fa29f6d22d71b3e4cab53ba5. Normal publication hooks passed: 4,437 Flutter tests, 49 skipped, four unconfigured-push tests and 27 crypto tests, plus analysis and file-size checks. No hook bypass was used.

Earlier fixture mutations at 082149e503a899daad5711a7815ac86e71fc3a16 caught a renamed requirement field; earlier parser controls covered freshness, capability, protocol and body limits. These are historical parser checks, not evidence of a runtime upgrade workflow.

No manual app or device testing. Runtime integration, merged-producer fixture refresh and any mobile product disposition remain open. No release or enforcement change is part of this PR.

Generated with Codex

@bradseiler
bradseiler marked this pull request as ready for review November 4, 2026 00:01
@bradseiler
bradseiler requested a review from a team as a code owner November 4, 2026 00:01
@bradseiler
bradseiler marked this pull request as draft November 4, 2026 00:01
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is af54258f19ac32667c027f889652bdeb479c8e13...5e9dfb00f0952ee6fa29f6d22d71b3e4cab53ba5.
A new review must complete for this exact range. When manual authorization
is required, a user with write access must comment exactly
@buzz-security-review 5e9dfb00f0952ee6fa29f6d22d71b3e4cab53ba5 to authorize a new review.
Any previous review applies only to its recorded range.

@bradseiler
bradseiler force-pushed the seiler/BUZZ-517/required-auth-guidance branch from 082149e to 5469ede Compare November 4, 2026 16:07
@github-actions github-actions Bot removed the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 4, 2026
@bradseiler
bradseiler force-pushed the seiler/BUZZ-517/required-auth-guidance branch from 5469ede to 93be55f Compare November 4, 2026 16:27
bradseiler and others added 5 commits November 4, 2026 18:31
Prepare BUZZ-517 discovery parsing while the relay contract and compatible maintenance upgrade destinations are pending.

Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz>
Signed-off-by: Brad Seiler <seiler@squareup.com>
Keep required policy visible for unsupported freshness classes (BUZZ-517 review finding 2). Protocol compatibility alone never authorizes a sign-in origin.

Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz>
Signed-off-by: Brad Seiler <seiler@squareup.com>
Use valid oversized JSON so removing the cap fails the regression (BUZZ-517 review finding 3).

Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz>
Signed-off-by: Brad Seiler <seiler@squareup.com>
Make the FI capability flag and core protocol cases independently catch their missing production guards.

Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz>
Signed-off-by: Brad Seiler <seiler@squareup.com>
Bind BUZZ-517 consumer tests to the production BUZZ-511 router output at d3ae493, including optional capability advertisement.

Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz>
Signed-off-by: Brad Seiler <seiler@squareup.com>
@bradseiler
bradseiler force-pushed the seiler/BUZZ-517/required-auth-guidance branch from 93be55f to 5e9dfb0 Compare November 4, 2026 23:37
bradseiler added a commit that referenced this pull request Nov 5, 2026
## Summary

Old Buzz desktop clients now check a community’s public requirement
before each connection. An explicit `requires_nip_fi: true` shows an
upgrade screen with a fixed https://buzz.xyz download action and manual
fallback. Missing or false requirements, and failed discovery, preserve
normal connection behavior.

Retry, community navigation and address editing preserve keys and saved
communities. Changing an address cancels the old onboarding transaction
and fences pending profile checks. Native discovery sends no
credentials, follows no redirects, and limits requests to five seconds
and 256 KiB. Wire fixtures are exported from main `6b8a72e835` with
reproducible provenance.

### Related issue


[BUZZ-517](https://linear.app/squareup/issue/BUZZ-517/v0-clients-show-an-upgrade-screen-for-communities-requiring-nip-fi).
Related: [#8984](#8984) contains
mobile parser preparation;
[#8920](#8920) repairs relay rejection
messages.

### Rollout

There is no client flag. The upgrade screen appears only when the relay
advertises `requires_nip_fi: true`. Public auto-update delivery requires
a desktop release containing this change and promotion to the [OSS
auto-update
feed](https://github.com/block/buzz/blob/aa749a862ef60887de5507b425a70f3024a6b61c/RELEASING.md#promote-an-oss-desktop-release-to-auto-update).

In Shadow mode, requiring a community activates the screen; making it
optional restores normal connections. Global Enforce requires every
community regardless of that setting. Rollback must restore an effective
non-required policy. The optional and required outcomes are demonstrated
by Brad’s two manual cases below.

### Testing

At `71689b4708`, Honor’s isolated browser journeys passed 3/3 with zero
retries and verified served assets, including the fixed
`https://buzz.xyz` opener and manual fallback. McKeon independently
built and passed the same three journeys at the previous head
`8caa25260b` with the repository command: `CI=1 pnpm --dir desktop
build:e2e`, then `CI=1 pnpm --dir desktop exec playwright test
relay-entry-guidance.spec.ts --project=smoke`. Native IPC was mocked.

Brad [tested the running pre-rebase app
locally](#9033 (comment)):
an optional bb-public community in Shadow connected without a message;
required bb-block staging showed the upgrade message. These results
apply to that running app, not the rebased head.

Before:

![Earlier upgrade card with synthetic community
data](https://github.com/user-attachments/assets/63fbaa66-d551-4c20-ab04-c7fd966638e0)

After:

![Public upgrade card with Download latest Buzz action at
buzz.xyz](https://github.com/user-attachments/assets/f26a5d2a-47b4-4510-a86f-667d6f7c6d3d)

Generated with Codex

---------

Signed-off-by: Brad Seiler <seiler@squareup.com>
Co-authored-by: Honor <e0bf479eeebe47dde1e35705212a4df70616a7bc834d907ddfb18cf0405f8b1b@seiler-test.communities.public.builderlabstaging.xyz>
@bradseiler bradseiler closed this Nov 6, 2026
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