Skip to content

Sync the Mirror from argusappsec/argus on a schedule #5

Description

@davideimola

Parent

#1

What to build

The site tracks the Guide with nobody remembering to publish. A scheduled job replaces the Mirror with the current state of docs/guide/ from argusappsec/argus and commits it, so merging documentation upstream is the whole act of shipping it.

The logic is a script the workflow invokes, not logic inside workflow YAML — a workflow cannot be tested and a script can. That split is the reason this ticket has a test seam at all.

No credential exists anywhere. argusappsec/argus is public, so reading it needs none, and writing here uses the workflow's built-in token. It commits straight to the default branch: there are no Translations yet, so the diff has no reader a review gate would serve, and a gate would be pure friction on every upstream docs change.

The Sync deletes as well as adds, so a page removed upstream also leaves the site instead of lingering forever. That is safe because it replaces one directory whose only contents are mirrored pages — future Translation directories are siblings of it, never interleaved, so destructive replacement is structurally unable to reach them. The guarantee comes from the layout, not from an exclusion list somebody must remember to extend.

It must be able to replace a Mirror that was seeded by hand in the scaffold ticket.

See ADR 0002 for the reasoning, including why a committed Mirror beats a build-time fetch and why the pull direction beats a push.

Acceptance criteria

  • A page added upstream appears in the Mirror after a run
  • A page changed upstream is updated in the Mirror after a run
  • A page deleted upstream disappears from the Mirror after a run
  • A sibling directory of the Mirror, standing in for a future Translation, is left byte-for-byte untouched
  • A run that finds no difference produces no commit
  • The workflow declares no secret and no cross-repository token
  • The Sync can replace a hand-seeded Mirror, leaving no trace of the bootstrap
  • Tests cover add, change, delete and sibling-untouched against fixture trees, using node:test

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions