Expand server auth coverage with end-to-end unit scenarios for token, network, and invite flows#75
Draft
Copilot wants to merge 2 commits into
Draft
Expand server auth coverage with end-to-end unit scenarios for token, network, and invite flows#75Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/sleep2agi/agent-network/sessions/7336a48b-a977-47cc-b4a6-093bbde1eeb7 Co-authored-by: vansin <25839884+vansin@users.noreply.github.com>
Agent-Logs-Url: https://github.com/sleep2agi/agent-network/sessions/7336a48b-a977-47cc-b4a6-093bbde1eeb7 Co-authored-by: vansin <25839884+vansin@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
vansin
May 14, 2026 02:47
View session
This was referenced May 14, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses low test coverage in the server auth domain by adding focused tests for high-risk, previously under-covered behavior in
server/src/auth.ts. The new suite exercises core lifecycle paths and permission boundaries that were not covered by existing token/password dictionary tests.Coverage focus: auth workflow surface
server/src/auth-workflows.test.tsto cover real auth lifecycles instead of isolated helpers.Token and login lifecycle
resolveTokenbehavior, including metadata (tokenName,networkId) andlast_used_atupdates.revokeToken,revokeOtherUserTokens) and multi-token user session behavior.Authorization and network boundaries
Password and admin reset flow
changePasswordfailure and success paths (weak password rejection, old password mismatch, token revocation on success).resetUserPasswordadmin-only enforcement, credential rotation, and audit log emission.Invite and membership edge cases