Skip to content

[passion] add test to compare specification and implementation - #25878

Merged
Kharonus merged 31 commits into
devfrom
passion/api-tests-for-endpoint-implementation
Oct 22, 2026
Merged

Kharonus merged 31 commits into
devfrom
passion/api-tests-for-endpoint-implementation

Conversation

@Kharonus

@Kharonus Kharonus commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

⚠️ KEEP OPEN UNTIL ALL NOW FAILING SPECS ARE FIXED ⚠️

  • fixing PRs will target this branch
  • review only the added spec plus custom matchers

What are you trying to accomplish?

  • get a control about the completeness of the APIv3 specification

What approach did you choose and why?

  • compare implemented and specified routes for the APIv3
  • report any implemented route, that is not specified
  • report any specified route, that is not implemented

AI involvement

None/Assisted – No AI assistance used OR only autocomplete/pasted snippets. I effectively wrote and understand all the code.

@Kharonus
Kharonus requested a review from a team October 7, 2026 15:51
@Kharonus Kharonus self-assigned this Oct 7, 2026
@github-actions github-actions Bot added the ai: None/Assisted 👤 No AI assistance used OR only snippets. A human effectively wrote and understands all the code. label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Warning

This pull request does not link an OpenProject work package.

Please add a link to the work package in the description, or reference it in the
title in square brackets, e.g. [SLUG-123] My title here.

@Kharonus
Kharonus force-pushed the passion/api-tests-for-endpoint-implementation branch from ed3e644 to 5c14673 Compare October 9, 2026 08:17
Base automatically changed from passion/api-spec-upgrade to dev October 9, 2026 09:19
Comment thread spec/support/matchers/include_route_definition.rb Outdated

@NobodysNightmare NobodysNightmare 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.

Generally LGTM. I am not yet sure about the case insensitive matching.

NobodysNightmare and others added 11 commits October 9, 2026 14:45
Those are not really implemented and apparently just served the point
of saying "this is what an endpoint could look like"
The namespace was only correct in cases where the endpoint was
defined as `get do` or `post do`, i.e. without an additional parameter.

As soon as they get passed a parameter (e.g. `post :prepare_upload do`)
their namespace does not include the relevant last part of the endpoint anymore,
thus claiming that the given endpoints were not implemented.
For now this only affects the default 404 handler that we invoke
for anything that's not defined. We definitely want to ignore this one.

This one could also be excluded differently, but right now this is
a working matcher and I have a hard time coming up with likely scenarios
where we'll use the any matcher for request method in the future.
[passion] Fix missing implementation for API specs
Kharonus and others added 6 commits October 14, 2026 10:48
@Kharonus
Kharonus requested a review from a team October 16, 2026 14:37

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ℹ️ Only the files in spec are for review, the rest was merged into this branch with other PRs

@Kharonus
Kharonus force-pushed the passion/api-tests-for-endpoint-implementation branch from 91209f1 to ad78c01 Compare October 22, 2026 08:28
@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./spec/features/work_packages/table/queries/id_filter_spec.rb[1:1]
🤖 Ask Copilot to investigate

Copy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer.

@copilot The following spec(s) are flaky in CI (first seen on PR #25878, linked for reference only):

- `rspec ./spec/features/work_packages/table/queries/id_filter_spec.rb[1:1]`

Treat this as a standalone task, unrelated to PR #25878. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #25878 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @Kharonus to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @Kharonus, and request a review from @Kharonus.
On every commit, set @Kharonus as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

@Kharonus
Kharonus merged commit 687a291 into dev Oct 22, 2026
19 checks passed
@Kharonus
Kharonus deleted the passion/api-tests-for-endpoint-implementation branch October 22, 2026 09:59
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ai: None/Assisted 👤 No AI assistance used OR only snippets. A human effectively wrote and understands all the code.

Development

Successfully merging this pull request may close these issues.

3 participants