Skip to content

Expose test-result file URLs, configurable cookie Secure flag, fix config drift - #237

Merged
HermanPlay merged 2 commits into
masterfrom
feat/test-result-signed-urls-and-cookie-secure
Aug 10, 2026
Merged

HermanPlay merged 2 commits into
masterfrom
feat/test-result-signed-urls-and-cookie-secure

Conversation

@HermanPlay

Copy link
Copy Markdown
Member

Closes #234, #235, #236.

Changes

Test-result file URLs (#234)

  • TestResult schema gains stdoutUrl, stderrUrl, diffUrl (signed, omitempty).
  • testResultsModelToSchema populates them via GetSignedFileURL (helper signedFileURL, empty string on failure).
  • submissionRepository.Get (detail) preloads Result.TestResults.{StdoutFile,StderrFile,DiffFile} so the relations are available.
  • OpenAPI regenerated via make docs.

Cookie Secure flag (#235)

  • setRefreshTokenCookie + logout cookie clear now use an env-driven flag.
  • New COOKIE_SECURE config (APIConfig.CookieSecure, default false), wired through initializationNewAuthRoute.
  • Deployment prod compose sets COOKIE_SECURE=true.

Config drift (#236)

  • .env.example FILE_STORAGE_PORT 8888 → 8081 (internal server; 8888 is public/unsigned).
  • Fixed API_PORTAPP_PORT doc comment; documented FILE_STORAGE_PUBLIC_URL and COOKIE_SECURE.

Verification

  • go build, go vet, go test ./... pass.
  • Pre-commit hooks (golangci-lint, gofmt, unit tests, swagger check) pass.
  • New tests: TestGetSignedTestResultURLs, TestRefreshTokenCookieSecureFlag.

…fix config drift

- TestResult schema gains stdoutUrl/stderrUrl/diffUrl signed URLs
  (submission detail preloads file relations)
- refresh-token cookie Secure flag now env-driven (COOKIE_SECURE), default false
- fix FILE_STORAGE_PORT doc drift (.env.example used public 8888)
- correct APP_PORT doc comment; document FILE_STORAGE_PUBLIC_URL/COOKIE_SECURE
@HermanPlay
HermanPlay requested a review from a team as a code owner August 10, 2026 19:26
Copilot AI lite review requested due to automatic review settings August 10, 2026 19:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Note

This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.

…t v2.12.2, pin CI version

- config.go: define all env var names as constants (envDBHost, envAPPPort, ...),
  use them in NewConfig and config_test.go
- filestorage service/validation_rules: extract context-key and directory constants
- test files: replace repeated string literals with constants (goconst)
- pin golangci-lint to v2.12.2 in pre-commit + copilot-setup workflows
  (was @latest; version drift flagged pre-existing goconst issues)
@HermanPlay
HermanPlay merged commit 92bd781 into master Aug 10, 2026
8 checks passed
@HermanPlay
HermanPlay deleted the feat/test-result-signed-urls-and-cookie-secure branch August 10, 2026 21:25
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.

Expose stdout/stderr/diff signed URLs in TestResult schema

2 participants