Skip to content

refactor: run Chromium through the internal/app pipeline - #656

Merged
moonD4rk merged 1 commit into
refactor/main-v2from
refactor/v2-08-app-pipeline
Oct 27, 2026
Merged

moonD4rk merged 1 commit into
refactor/main-v2from
refactor/v2-08-app-pipeline

Conversation

@moonD4rk

Copy link
Copy Markdown
Owner

Phase 5, step 3 of 3 (RFC-012): the app pipeline, run on the Chromium base.

What

New internal/app with the stages and values of RFC-001/003:

  • Validate turns Flags into a Request: categories are parsed (a repeated one runs once), the format is checked, and the home directory is resolved once. The rules are today's; validate-first ordering and the -p fixes land with the switch-over.
  • Discover dispatches on Def.Base; Firefox and Safari join in Phase 6. -p applies only with one named browser, as today, and an unreadable user data dir becomes a Failed result.
  • NewPlan builds Plan{Dirs, Files, Extractions, Skipped}. It only stats files. Each file is captured once (Local State, and History for history plus downloads). An extraction is absent when a required source is missing or none of the profile's own optional sources is there; unsupported when the base has no extractor for the category.
  • Execute works one user data dir at a time: temp snapshot, Capture, extractions in plan order, each one's records to the writer as it finishes, then the snapshot is removed.
    • A dir's keys are retrieved once, on the first decrypt, through chromium.KeyLocator + masterkey.RetrieveAll; on macOS the run's login keychain is added to the Locator.
    • Request.Keys supplies a dump's keys instead, as the parity test does.
    • A retrieval error is reported once as the dir's result.
  • Outcomes follow RFC-001:
    • ok: no problems, including zero records.
    • partial: records plus Fails.
    • error: the extractor failed, or there were Fails and no records.
    • absent: a source vanished after planning.
    • The zero Outcome reads unset, never ok.
  • Report prints one line per result. It is not wired to the CLI yet; its layout gets a second look when it becomes visible at the switch-over.
  • RFC-003's absent rule now says a shared source never makes an extraction present by itself.

Parity

TestPipelineGolden (cmd) builds the Chromium fixtures at this OS's table paths under a temp home and runs Validate → Discover → NewPlan → Execute with the fixture keys. It writes extract-csv, extract-json, and extract-cookie-editor byte for byte, the same goldens today's path writes. The CLI still runs today's path.

Tests

  • Validate rules.
  • Discover: table order, -b filter, -p with and without a browser, unreadable dir.
  • The whole Plan for a two-profile dir, compared with DeepEqual.
  • First candidate on disk, flat layout, unsupported.
  • Every outcome rule, with records exported even when the extractor then fails.
  • Keys retrieved once per dir, and the dir-level error result.
  • History-only runs never retrieve keys.
  • Each dir's snapshot is removed before the next one is captured.
  • An output failure stops the run and leaves no copies.
  • Report.

golangci-lint reports 0 issues for darwin, linux, and windows.

Merge waits for the Phase 5 Windows smoke.

Validate, Discover, NewPlan, Execute, and Report run beside today's path: one snapshot per user
data dir, each dir's keys retrieved once on first use, every record stamped by the collector.
On the Chromium fixtures it writes the extract goldens byte for byte; the CLI switches over later.
@moonD4rk
moonD4rk merged commit 2b70e4a into refactor/main-v2 Oct 27, 2026
9 checks passed
@moonD4rk
moonD4rk deleted the refactor/v2-08-app-pipeline branch October 27, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant