Skip to content

Fix #439: Api key creation not working - #440

Open
ekwav-agent wants to merge 3 commits into
Coflnet:mainfrom
ekwav-agent:ekwav-agent/task_jt4lpfe3l5p7l5cfjm7q
Open

Fix #439: Api key creation not working#440
ekwav-agent wants to merge 3 commits into
Coflnet:mainfrom
ekwav-agent:ekwav-agent/task_jt4lpfe3l5p7l5cfjm7q

Conversation

@ekwav-agent

Copy link
Copy Markdown
Contributor

Automated patch for #439 from task task_jt4lpfe3l5p7l5cfjm7q.

Base branch: main
Base commit: 68aa16ce4929f7adfbf350546b23bcfa0a9165ce

Review: separate codex session recorded.

WARNING: review uses a separate session of the same provider; it is not an independent-provider review

Tests:

  • container_build — sha256:ed6b413312081d47c9af7fcacddf3c3fb6ded0eee4a49cdf7628a7bafa9c7b12
  • regression_base_fail_patch_pass — trusted-harness exact command, isolated checkout servers, and reviewed test overlays: overlay_derivation=applied:1 sibling_setup_exit=0 overlay_setup_exit=0 overlay_review_digest=unavailable overlay_receipt_sha256=unavailable base_setup_exit=0 base_setup_log_sha256=unavailable server_isolation_exit=0 base_exit=1 base_log_sha256=7678f7d9b6a06d461f3f1cafe24e0f06c341e9ccb237733248f4ef3e26a48367 patched_exit=0 patched_log_sha256=426c99ca80c2d44f6a9e9f81b6d38f6cd2a35e4de8bf9b10eeb0f84955a7eb30

Corrected the credential regression.

  • Restored bare /cofl api behavior unchanged: existing active keys are displayed; a key is generated only when none exist.
  • Fixed the user lookup in ApiKeyService.cs by allowing the non-partition-key query when a secondary index is unavailable.
  • Added regression coverage for lookup behavior, no-key creation, and the existing-active-key case in ApiCommand.Tests.cs.

Validation:

  • Base 68aa16ce: regression fails the intended assertion because the query lacks ALLOW FILTERING; 261 passed, 2 skipped, 1 failed.
  • Patch: all 264 tests pass.
  • Required docker build --pull --tag coflnet-sky-mod-commands-test . passes.
  • git diff HEAD --check passes.
  • Updated .coflnet-regression.json with the exact comparison command.

Production report e9a3c2 supports that the failing input was bare /cofl api; it does not expose the underlying database exception, so no stronger telemetry claim is made. Auction data in that report was unrelated and was not fetched. Authentication, payments, player data, permissions, and report tracing remain unchanged.

This PR cannot be merged or approved by the automation identity; human review is required.

@ekwav-agent
ekwav-agent requested a review from Ekwav August 26, 2026 18:16
Comment thread Services/ApiKeyService.cs
+ "WITH default_time_to_live = 15552000"); // 180 days

// Ensure secondary index on user_id for querying by user
session.Execute("CREATE INDEX IF NOT EXISTS ON api_keys (user_id)");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why is this index not used

@ekwav-agent
ekwav-agent requested a review from Ekwav August 27, 2026 08:04

@Ekwav Ekwav left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is now no behavioral change anymore, I don't think virtual is a valid change, why was that made

@ekwav-agent
ekwav-agent requested a review from Ekwav August 27, 2026 20:51
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.

2 participants