Skip to content

branding/scripts/export_brand_assets.py still writes into the removed Go dashboard tree #2220

Description

@Xore

Summary

branding/scripts/export_brand_assets.py never survived the Go dashboard's removal: its two output constants (DASHBOARD_STATIC, PDF_ASSETS) still point at arcane/home/honeypot-dashboard/dashboard/{static,assets_pdf}, a directory tree that no longer exists. Running the canonical regeneration command crashes partway through and, even before that crash point, cannot deliver its PDF emblem outputs to the only place that consumes them.

Evidence

  • export_brand_assets.py:21-22:
    DASHBOARD_STATIC = ROOT / "arcane" / "home" / "honeypot-dashboard" / "dashboard" / "static"
    PDF_ASSETS = ROOT / "arcane" / "home" / "honeypot-dashboard" / "dashboard" / "assets_pdf"
    Neither path exists on disk (Go dashboard removed; the vendor manifest no longer declares it).
  • The real consumer of the mask outputs is the Rust report composer, which embeds them at compile time from a different location entirely:
    • backend-service/src/report_pdf.rs:322: include_bytes!("../assets_pdf/watermark.maskdata")
    • backend-service/src/report_pdf.rs:325: include_bytes!("../assets_pdf/apiary-header-mark.maskdata")
    • i.e. backend-service/assets_pdf/, where both files live today.
  • Failure shape when run today: main() → export_logos() succeeds (regenerating branding/assets/logo/* plus docs/assets/apiary-readme.png), then export_favicons() hits shutil.copy2(DASHBOARD_STATIC / "favicon.ico", ...) → FileNotFoundError. Result: a half-regenerated asset tree — logos current, favicons/social/PDF masks stale.
  • Favicon sourcing is also lost: the script copies favicons from dashboard/static/ as their master source, so with that tree gone the favicon step has neither a source nor a destination. The copies in branding/assets/favicon/ are frozen snapshots.
  • Contrast: the sibling script was repointed by the same retirement migration — check_theme_sync.py:17-18 carries an explicit "Remove the legacy Go dashboard folder completely #1659: repointed at frontend-next after the Go dashboard's retirement" comment. git log shows export_brand_assets.py last touched by 451e69b ("repoint every remaining reference to moved feat(deploy): migrate home APIARY stacks to Arcane directory-aware Git sync #1502 stack paths"), which missed these constants.
  • The script is the documented canonical path: the brand guide's Application-standards page instructs "Regenerate raster exports with branding/scripts/export_brand_assets.py".

What needs to change

  1. Repoint PDF_ASSETS to backend-service/assets_pdf/ so regenerated watermark/header masks actually reach the include_bytes! consumer (and remove the now-dead mkdir for the old path or keep it local to the new root).
  2. Resolve the favicon step's lost source: either track true masters under branding/source/ (so branding assets stop being downstream snapshots of a deleted tree) or source directly from the surviving static location, and state the choice in the script header.
  3. Re-run end to end; verify backend-service/assets_pdf/*.maskdata regenerate unchanged byte-for-byte for the current marks (determinism check).

Acceptance criteria

  • python3 branding/scripts/export_brand_assets.py completes without error from a clean checkout; no reference to any honeypot-dashboard/dashboard/ path remains in the script.
  • Regenerated watermark.maskdata / apiary-header-mark.maskdata land where report_pdf.rs embeds them, and a rebuild of backend-service picks them up.
  • Favicon/webmanifest outputs have a source path that exists in-repo, so regeneration does not depend on a retired stack.

Related

Activity

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

Metadata

Metadata

Assignees

Labels

dashboardDashboard product area — routes, templates, styling and frontend UXdocumentationImprovements or additions to documentation

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions