Skip to content

Pages export tests fail when git remote is not a GitHub URL #27

@gmoon

Description

@gmoon

Summary

3 of 4 tests in tests/pages_export_test.rs fail when the git remote origin is not a standard GitHub URL (e.g., a local proxy, CI mirror, or non-GitHub host).

Failing Tests

  • test_export_pages_creates_json_and_html
  • test_export_pages_html_redirects_to_reader
  • test_pages_json_has_metadata_wrapper

Root Cause

All three tests run lattice export --format pages --output <tmpdir> against the real working directory. The pages export format calls into REQ-CLI-016 (Git Remote URL Parsing) to derive the GitHub Pages base URL. When the origin remote isn't a recognized GitHub URL, it fails with:

Error: Could not derive GitHub Pages URL from git remote. Ensure a GitHub origin is configured.

This happens in any environment where the remote is proxied or non-GitHub, including some CI setups and Claude Code web sessions.

Expected Behavior

Tests should either:

  1. Mock the git remote — set up a temp repo with a GitHub-style remote, or
  2. Accept a --base-url override — so the test can pass an explicit URL instead of relying on remote parsing, or
  3. Skip gracefully — detect the non-GitHub remote and mark the test as skipped rather than failing

Environment

  • git remote -v shows a local proxy URL: http://local_proxy@127.0.0.1:41421/git/forkzero/lattice
  • The 4th test (test_json_export_has_metadata_wrapper) passes because it tests JSON export, not pages export

Related

  • REQ-CLI-016 — Git Remote URL Parsing for GitHub Pages
  • REQ-CLI-015 — GitHub Pages Export Format

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions