Atlas Plan
Plans002 2026 02 20 Sync and Source Config

Progress

  • 2026-02-20 17:58 - T-001 completed

    • Created source/config/ions-2026.yaml with per-file paths, sheet lists, header rows, and column maps.
    • Captured real workbook anomalies (e.g., REKAP FEBUARI, leading-space ' REKAP JULI', and SEPTEMBER25 tab in 2026 workbook).
  • 2026-02-20 18:01 - T-004 completed

    • Scaffolded @packages/sync with package.json, tsconfig.json, and eslint.config.mjs.
    • Added @packages/sync/@source/index.ts placeholder to keep TypeScript include paths valid for follow-up tasks.
  • 2026-02-20 18:10 - T-002 completed

    • Created source/config/ions-2025.yaml with 2025 file paths and sheet definitions.
    • Omitted targets entry because EVALUASI DATA SISWA is not available in 2025 source workbook.
  • 2026-02-20 18:12 - T-003 completed

    • Created source/config/ions-2024.yaml and source/config/ions-2023.yaml with year-specific sheet conventions.
    • Captured 2023 differences: space-separated month sheets (JANUARI 23), no JENIS KELAMIN, swapped POLA PEMBAYARAN and CARA BAYAR, and no organizations block.
  • 2026-02-20 18:18 - T-005 completed

    • Implemented SourceConfig types in @packages/sync/@source/config.ts covering entity/year/files and file sheet/header/column structure.
    • Exported types through @packages/sync/@source/index.ts.
  • 2026-02-20 18:20 - T-007 completed

    • Implemented loadConfig(entity, year) to read source/config/{entity}-{year}.yaml, validate structure, and resolve configured file paths against project root.
    • Added explicit not-found and invalid-format errors.
  • 2026-02-20 18:21 - Verification

    • Ran bun install to refresh workspace lockfile after adding @packages/sync.
    • Ran bun run --filter @packages/sync test:type successfully.
  • 2026-02-20 18:25 - Metadata correction

    • Reconciled Tasks.md statuses after compliance review (T-007 set to completed, T-006 restored to pending).
  • 2026-02-20 18:40 - T-006 completed

    • Implemented @packages/sync/@source/duck.ts with DuckDB connection lifecycle and raw-table helpers.
    • Implemented createRawTable(conn, tableName, filePath, sheetName, headerRow) using read_xlsx with a range derived from headerRow (Node API binding does not expose header_row).
  • 2026-02-20 18:45 - T-008 completed

    • Implemented @packages/sync/@source/adapters/xlsx.ts with per-file/per-sheet loading, table-level aggregation, and optional month filtering.
    • Added fallback path for sheets with inconsistent headers and row-count logging per raw table.
  • 2026-02-20 18:49 - T-009 completed

    • Implemented @packages/sync/@source/seed.ts using @libsql/client, idempotent upserts, and registry-aligned lookup seed values.
    • Added root-aware DATABASE_URL default to file:atlas-ops.db at project root.
  • 2026-02-20 18:52 - T-010 completed

    • Implemented CLI entrypoint at @packages/sync/@source/index.ts with --source, --entity, --year, --month, and --seed handling.
    • Wired routing between syncXlsx and seed, including error handling with non-zero exit on failure.
  • 2026-02-20 18:54 - T-011 completed

    • Added root scripts in package.json (sync, sync:seed) and updated AGENTS.md command docs for year/month sync usage.
  • 2026-02-20 18:57 - T-012 completed

    • Ran bun install successfully after dependency updates.
    • Ran bun run test:type --filter @packages/sync successfully (Turbo + package check both passing).
  • 2026-02-20 19:02 - T-013 completed

    • Ran bun run sync:seed --entity IONS, bun run sync --source xlsx --entity IONS --year 2026, and --month 2 CLI verification.
    • Verified root atlas.db contains all expected raw tables with >0 rows and required 2026 key columns (NO. KWITANSI, NAMA KELAS, BULAN, INTAKE).
  • 2026-02-20 19:07 - Final checkpoint

    • Reconciled remaining plan metadata inconsistencies (T-006 status and Summary wording), then marked plan complete.

On this page