Skip to content

[Bug] Unanchored export/ in .gitignore hides src/agent-os/video/export from git, so typecheck fails on every CI run #3

Open

Description

@paopaonyapi-creator

Client or integration

Other

Area

Installation or packaging

Summary

.gitignore:70 contains an unanchored export/ pattern, written for a root-level runtime
output directory (the comment above it reads "Local runtime SQLite database and export/", next to
go/ and scratch/). A gitignore pattern without a leading slash matches at every depth, so it
also swallows src/agent-os/video/export/.

The consequence is that src/agent-os/video/export/export-package-builder.ts exists on every
working checkout but was never committed, while two tracked modules import it
(src/agent-os/video/index.ts:23, src/agent-os/video/mcp-tools.ts:8) and a third re-exports the
symbol (src/server/management/video-routes.ts:12). On a fresh clone bun run typecheck therefore
fails with three errors, which turns the gates job red, which turns the ci aggregate red.

Every Cross-platform CI run on this repository has been failing since 2026-09-09 for this
reason
, on any branch, including pull requests that touch nothing related. This makes the red
baseline meaningless as a review signal: a contributor cannot tell their own breakage from this one
without diffing the failed-job set against the base commit.

It stayed invisible because it only fails where the file is absent. A local bun run typecheck is
green, because the untracked file is sitting right there. git add on that path does nothing
without -f, so nobody ever got an error worth noticing.

The pattern is a time-of-creation trap rather than a content problem: src/agent-os/export/ holds
stock-export-builder.ts, which is tracked, because it predates the ignore rule. Two
directories with the same name, one committed and one permanently invisible, differ only in which
order they were created.

Reproduction

On a fresh clone at the current dev (e7be56876):

git clone <this repo> && cd opencodex
git ls-tree -r --name-only dev -- src/agent-os/video/export/     # empty: never committed
git check-ignore -v src/agent-os/video/export/export-package-builder.ts
  .gitignore:70:export/   src/agent-os/video/export/export-package-builder.ts
bun install
bun run typecheck

The same three errors as CI run 34407531289, job gates, step Typecheck:

src/agent-os/video/index.ts(23,15): error TS2307: Cannot find module
  './export/export-package-builder' or its corresponding type declarations.
src/agent-os/video/mcp-tools.ts(8,43): error TS2307: Cannot find module
  './export/export-package-builder' or its corresponding type declarations.
src/server/management/video-routes.ts(12,3): error TS2305: Module
  '"../../agent-os/video"' has no exported member 'VideoExportPackageBuilder'.

The last error is a knock-on, not a separate defect: the barrel's re-export resolves to nothing
because the module behind it is missing.

Independent of the clone test, the failed-job set of this repository's dev and of an unrelated
feature branch are identical (test 1/4–test 4/4, gates, npm-global on all three OS,
storage policy, api usage, macos, ci), which is how the blast radius was confirmed to be
baseline rather than per-change.

Root cause analysis

One unanchored ignore pattern, plus no guard that connects .gitignore to the import graph.

tests/repo-hygiene.test.ts already carries mechanical guards of exactly this shape — it fails if a
160000 gitlink is tracked anywhere, and if the paths excised before publication reappear in the
index. It does not currently check that an ignored path is reachable from a tracked module's
imports, which is the assertion that would have caught this the day the file was first written.

Suggested fix

  1. Anchor the pattern to the root: export/ → /export/. Audit the neighbours in the same block
    (go/, scratch/, export/) for the same unanchored-at-any-depth mistake.
  2. git add src/agent-os/video/export/export-package-builder.ts and confirm bun run typecheck
    passes on a clean clone.
  3. Add a regression test alongside the existing repo-hygiene guards: for every tracked module,
    resolve its relative imports and fail if any target path is gitignored but not tracked. That is
    the class-level fix — it catches the next directory named after any loose ignore pattern, not just
    this one.

I have not opened a fix PR here because the correct scope is a judgement call: steps 1 and 2 are
mechanical, but step 3 changes what repo-hygiene asserts, and the go/ and scratch/ lines may be
unanchored deliberately.

Version

2.62.0, present on dev at e7be56876

Operating system

Reported from Windows 11 (build 26200); the CI failures reproduce on ubuntu-latest,
windows-latest and macos-latest because a fresh clone is missing the file on every platform.

Logs or error output

CI runs of Cross-platform CI on this repository, branch dev:

34407531289  e7be56876  failure    2026-09-09
34403898084  971e1c63b  failure    2026-09-09
34402324575  55c337846  cancelled  2026-09-09
34400742827  bb7d3ddab  cancelled  2026-09-09

The two failures are the relevant ones; the cancellations are superseded pushes from the same
series. Job gates fails at step Typecheck; ci fails at
Assert every needed job succeeded or was skipped.

Screenshots and supporting files

No UI involved.

Redacted configuration

Not configuration-dependent; no provider or routing setup is involved.

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. github-actions commented on Sep 23, 2026

    @github-actions

    Automated translation bookkeeping — detected language: English.

  2. added
    installInstallation or packaging
    toolstool_calls, MCP, web-search / sidecar tools
    on Sep 23, 2026
  3. paopaonyapi-creator commented on Sep 23, 2026

    @paopaonyapi-creator
    OwnerAuthor

    Scope correction. This issue says every Cross-platform CI run has been failing for this
    reason
    . That overstates it: gates aborts at its first failing step, so the typecheck error was
    also hiding the next failure underneath it.

    Fixed by #4 — Typecheck is now success in CI with src/agent-os/video/export/export-package-builder.ts
    tracked. But gates still fails at the next step, GUI tests (cd gui && bun test --isolate tests),
    on i18n drift that has nothing to do with .gitignore. Filing separately.

    So the correct statement of this issue's reach is: it is the first cause of the red baseline and
    the reason ci could not be trusted as a signal, not the only cause. The remaining clusters
    (GUI tests, test 1/4–4/4, npm-global, storage policy, api usage) are independent defects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginstallInstallation or packagingtoolstool_calls, MCP, web-search / sidecar tools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions