• fork: QE: bring the Gitea listing regression tests to the account-scoped contract (FAR-217)
    fork-tests / verify (pull_request) Successful in 6m16s
    trufflehog / scan (pull_request) Successful in 33s

    Mike Roservices released this 2026-10-22 17:02:55 +00:00 | 3363 commits to local since this release

    FAR-217 scoped the Gitea repository search to the token's own account
    (GET /api/v1/user, then ?uid=), because an unscoped Gitea search lists every
    public repository on the instance, other tenants' included. It landed on dev with
    the three FAR-212 QE files still asserting the old contract, so dev's fork suites
    are red: 10 failures in
    server/src/__tests__/fork-project-repositories.qe.test.ts and
    server/src/modules/fork-project-repositories/adapters/providers.qe.test.ts.

    The tests now hold the contract as it is:

    • the fake host answers the account read, and the listing's call is asserted on the
      host and the token, with the caller's signal pinned separately;
    • the search is asserted to name the account the token belongs to, and the account
      read is asserted to go to the host that is searched;
    • the account id that arrives as a string is still accepted.

    That is a stronger assertion than before, not a looser one: the old fake would
    have answered an unscoped search, and the old contract could not tell a scoped
    listing from an unscoped one.

    Also: two fork test files boot the embedded Postgres with an explicit 20s hook
    timeout, tighter than the 30s server/vitest.config.ts gives every other boot
    hook. They are aligned to the same policy. On a loaded machine the boot can still
    exceed it; that is the sandbox, not the change.

    Test-only: no production code changed.

    Downloads