Skip to content

AIT-66: correct stale ac_-Bearer-token docstrings - #26

Merged
ord669 merged 1 commit into
mainfrom
ait-66-api-key-audit-nits
Jul 18, 2026
Merged

AIT-66: correct stale ac_-Bearer-token docstrings#26
ord669 merged 1 commit into
mainfrom
ait-66-api-key-audit-nits

Conversation

@ord669

@ord669 ord669 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Refs AIT-66 (item 6 of the audit-nit batch; main fixes in hookmyapp/hookmyapp#108)

Docstring/fixture sweep only — no runtime changes:

  • Comments claiming keys are "ac_ Bearer tokens" corrected: the Bearer secret is an opaque hmok_ token; ac_ is the credential's public row id (see backend agent-token-prefix.ts).
  • Test fixtures renamed ac_live_*hmok_live_* so they model the real token shape.

19 affected tests green, tsc clean. (3 pre-existing cli-error-integration.test.ts failures reproduce on clean main — unrelated, tracked under AIT-171.)

Summary by CodeRabbit

  • Documentation

    • Clarified that agent access tokens are opaque hmok_… Bearer tokens.
    • Distinguished secret access tokens from their associated ac_ public credential IDs.
    • Updated authentication, credential management, logout, and credential storage guidance to reflect the current terminology.
  • Tests

    • Updated authentication and refresh scenarios to use the current access-token format.

…mok_, ac_ is the credential public id (AIT-66)
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8d00011f-3bdc-4a8d-b32f-1be5684f7033

📥 Commits

Reviewing files that changed from the base of the PR and between 60caee9 and a8ff399.

📒 Files selected for processing (8)
  • src/api/__tests__/agent-auth.test.ts
  • src/api/__tests__/agent-refresh.test.ts
  • src/api/agent-auth.ts
  • src/auth/__tests__/agentmd-login.test.ts
  • src/auth/login.ts
  • src/auth/logout.ts
  • src/commands/credentials.ts
  • src/storage/secrets.ts

📝 Walkthrough

Walkthrough

Agent credential fixtures, assertions, and documentation now use opaque hmok_ access tokens while identifying credentials by their ac_ public ids. No runtime logic or public API declarations changed.

Changes

Agent credential token alignment

Layer / File(s) Summary
Token fixtures, assertions, and documentation
src/api/..., src/auth/..., src/commands/credentials.ts, src/storage/secrets.ts
Updated agent-auth and login test values to hmok_live_*, and clarified that persisted tokens are opaque hmok_ Bearer tokens distinct from ac_ public ids.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • hookmyapp/cli#9: Related agent/auth.md login flow and agent-credential token handling updates.
  • hookmyapp/cli#14: Related OTP login tests and claim-completion token expectations.
  • hookmyapp/cli#21: Related agent-credential token and refresh-flow changes.

Suggested reviewers: ordvir

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is specific, concise, and accurately reflects the main docstring terminology update in the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ait-66-api-key-audit-nits

Comment @coderabbitai help to get the list of available commands.

@ord669
ord669 merged commit bc116be into main Jul 18, 2026
3 checks passed
@ord669
ord669 deleted the ait-66-api-key-audit-nits branch July 18, 2026 13:32
ord669 added a commit that referenced this pull request Aug 12, 2026
…mok_, ac_ is the credential public id (AIT-66) (#26)
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