Skip to content

Move gonsole/auth/postgres and gonsole/auth/sqlite to gonsole/auth 0.8.0 - #79

Merged
SirLouen merged 4 commits into
mainfrom
feat/78-engines-020
Oct 14, 2026
Merged

SirLouen merged 4 commits into
mainfrom
feat/78-engines-020

Conversation

@SirLouen

@SirLouen SirLouen commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Closes #78

What

  • gonsole/auth/postgres and gonsole/auth/sqlite require gonsole/auth 0.8.0.
  • The go.mod of gonsole/auth/sqlite no longer lists pgx or authkit/postgres.
  • Two tests of gonsole/auth/postgres that compared it with the PostgreSQL code gonsole/auth 0.8.0 removed are deleted.
  • gonsole/auth/postgres now tests that Authorize refuses each account it cannot let through, as the SQLite module does.
  • The PostgreSQL record store answers each record's time in UTC, so account:records -json prints a UTC time, as on SQLite.

Why

A program that takes an engine module at 0.1.0 still gets gonsole/auth 0.7.0 in its module graph, and on SQLite that graph lists the PostgreSQL driver. Both modules release as 0.2.0, since taking them moves a program to the breaking gonsole/auth 0.8.0.

Testing Instructions

Run the tests of gonsole/auth/postgres against the PostgreSQL test server of dbkit/postgres/compose.yaml.

Summary by CodeRabbit

  • Bug Fixes
    • Account record timestamps in JSON output are now returned in UTC, matching the behavior on SQLite. This makes timestamps consistent across time zones and platforms.

@SirLouen SirLouen self-assigned this Oct 14, 2026
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 41 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c3ccbdae-03fb-42ad-a004-82f9d7034c59
📥 Commits

Reviewing files that changed from the base of the PR and between c9ee695 and e23b2f0.

📒 Files selected for processing: 1
  • gonsole/auth/sqlite/CHANGELOG.md

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 1831bf9d-932f-4c5f-b8b8-deb3a0038a71
📥 Commits

Reviewing files that changed from the base of the PR and between 5e7ccf8 and c9ee695.

⛔ Files ignored due to path filters: 2
  • gonsole/auth/postgres/go.sum is excluded by !**/*.sum
  • gonsole/auth/sqlite/go.sum is excluded by !**/*.sum
📒 Files selected for processing: 11
  • gonsole/auth/postgres/CHANGELOG.md
  • gonsole/auth/postgres/authorize_test.go
  • gonsole/auth/postgres/go.mod
  • gonsole/auth/postgres/lineage_test.go
  • gonsole/auth/postgres/parity_test.go
  • gonsole/auth/postgres/program_test.go
  • gonsole/auth/postgres/record_test.go
  • gonsole/auth/postgres/records.go
  • gonsole/auth/postgres/records_test.go
  • gonsole/auth/sqlite/CHANGELOG.md
  • gonsole/auth/sqlite/go.mod
💤 Files with no reviewable changes: 2
  • gonsole/auth/postgres/lineage_test.go
  • gonsole/auth/postgres/parity_test.go

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The PostgreSQL and SQLite auth modules now require gonsole/auth 0.8.0. PostgreSQL record timestamps are returned in UTC, and tests cover authorization and record output.

Changes: Auth module updates

Layer / File(s) Summary
Auth dependency and test setup
gonsole/auth/postgres/go.mod, gonsole/auth/sqlite/go.mod, gonsole/auth/postgres/CHANGELOG.md, gonsole/auth/sqlite/CHANGELOG.md, gonsole/auth/postgres/program_test.go, gonsole/auth/postgres/lineage_test.go, gonsole/auth/postgres/parity_test.go
Both modules update their gonsole/auth dependency to 0.8.0. The SQLite module removes PostgreSQL-related indirect dependencies. The PostgreSQL test program constructs its configuration directly. The lineage and parity tests are deleted.
Account role authorization tests
gonsole/auth/postgres/authorize_test.go
Tests check that accounts without the required capability are rejected without creating a record, and that an admin can change an account's role.
UTC record timestamps
gonsole/auth/postgres/records.go, gonsole/auth/postgres/records_test.go, gonsole/auth/postgres/record_test.go, gonsole/auth/postgres/CHANGELOG.md
Record scanning converts AppliedAt to UTC. Tests check UTC timestamps from Latest and in account:records JSON output.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to c9ee6

No issue requiring a change before merge was identified. Run the PostgreSQL tests against the specified test server as instructed.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Out of Scope Changes check Warning The PR adds PostgreSQL record-store behavior that converts AppliedAt to UTC and adds tests for UTC JSON output. It also adds PostgreSQL authorization refusal and success tests. These changes do not … Remove the unrelated UTC behavior and its tests, and remove the unrelated authorization tests, or link issues that require these changes.
Docstring Coverage Warning Docstring coverage is 41.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 5 files. (4 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely states the main change: both modules move to gonsole/auth 0.8.0.
Linked Issues check Passed Issue #78 requires both engine modules to require gonsole/auth 0.8.0 and requires removal of the two PostgreSQL comparison tests for code removed in 0.8.0. The summary shows these dependency updates…
Full details: Out of Scope Changes check

Explanation

The PR adds PostgreSQL record-store behavior that converts AppliedAt to UTC and adds tests for UTC JSON output. It also adds PostgreSQL authorization refusal and success tests. These changes do not implement the dependency migration, indirect-dependency cleanup, or deletion of tests required by issue #78. The linked issue does not specify these behavior changes.

Full details: Docstring Coverage

Explanation

Docstring coverage is 41.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 5 files. (4 skipped: 4 unsupported.)

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

codescene-access[bot]

This comment was marked as outdated.

@greptile-apps

greptile-apps Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High impact] No outstanding findings block merging. The previously reported SQLite changelog concern has been addressed.

Summary

Both engine modules now require gonsole/auth 0.8.0.

  • SQLite auth builds drop PostgreSQL packages as both modules move to auth 0.8.0.
  • PostgreSQL record listings return timestamps in UTC.
  • PostgreSQL tests cover which accounts can change roles.

Reviews (2) · Last reviewed commit: "docs(gonsole/auth/sqlite): say the build..." · Reviewed by Greptile

Comment thread gonsole/auth/sqlite/CHANGELOG.md Outdated

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gates Passed
4 Quality Gates Passed

See analysis details in CodeScene

Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@SirLouen
SirLouen merged commit d5b1909 into main Oct 14, 2026
41 checks passed
@SirLouen
SirLouen deleted the feat/78-engines-020 branch October 14, 2026 07:39
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.

Move gonsole/auth/postgres and gonsole/auth/sqlite to gonsole/auth 0.8.0

1 participant