Skip to content

go/prospectus enhancements#148

Merged
sorah merged 2 commits intomasterfrom
storage-rko
Jan 23, 2026
Merged

go/prospectus enhancements#148
sorah merged 2 commits intomasterfrom
storage-rko

Conversation

@sorah
Copy link
Member

@sorah sorah commented Jan 23, 2026

No description provided.

Comment on lines +77 to 87
describe "/go/prospectus-en?2025" do
let(:res) { http_get("https://rubykaigi.org/go/prospectus-en?2025") }
it "redirects to 2025 prospectus" do
expect(res.code).to eq("302")
expect(res["location"]).to eq("https://storage.rubykaigi.org/2025/rubykaigi2025-sponsorship-prospectus-en.pdf")
end
end

describe "(https) /2024/" do
let(:res) { http_get("https://rubykaigi.org/2024/") }
it "should render the top page" do
Copy link

Choose a reason for hiding this comment

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

Bug: The new /go/prospectus endpoint, handled by a CloudFront function, lacks any test coverage. The existing test suite doesn't exercise this production code.
Severity: MEDIUM

Suggested Fix

Add a dedicated test suite for the TypeScript CloudFront function. This could involve using a framework like Jest to unit test the handleProspectusRedirect() logic by mocking the CloudFront event object. This ensures the language detection and query string preservation are tested.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: spec/rubykaigi_org_spec.rb#L50-L87

Potential issue: The new `/go/prospectus` endpoint is implemented via a CloudFront
function (`viewreq.ts`) that performs language detection and redirects users. This
function is deployed to production but is completely untested. The existing Ruby test
suite does not and cannot invoke CloudFront functions, and no separate TypeScript tests
have been added. This creates a risk that bugs in the redirect logic, such as incorrect
handling of query parameters, could go undetected and impact production users.

Did we get this right? 👍 / 👎 to inform future reviews.

@sorah sorah merged commit c57a58a into master Jan 23, 2026
2 checks passed
@sorah sorah deleted the storage-rko branch January 23, 2026 04:13
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