Skip to content

Wonder CV Builder 1.0.0 — release candidate (offline-first, country-aware CV builder) - #1

Merged
arena-ai-coding-agent[bot] merged 49 commits into
mainfrom
arena/01a0e9bc-wonder-cv-builder
Sep 29, 2026
Merged

arena-ai-coding-agent[bot] merged 49 commits into
mainfrom
arena/01a0e9bc-wonder-cv-builder

Conversation

@arena-ai-coding-agent

@arena-ai-coding-agent arena-ai-coding-agent Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What this is

Wonder CV Builder (published as CV Pro) — an offline-first, country-aware CV builder, analyser and PDF engine for Android. No account, no sign-up, no cloud: the library, the regional rules, the analyser and the PDF engine all live on the device. Built against the 62-section brief in phases, with CI as the only compiler in the loop.

This is the 1.0.0 release candidate. Source, tests and project configuration are complete and green; publishing waits on owner-side steps (release signing secrets, store screenshots, privacy-policy URL, store panel fields).

CI on this head

Stage Result
Analyze — incl. the key-material scan as its first step ✅
Test — unit, widget, PDF regression ✅
Android debug — release APK and release AAB smoke build ✅
Build signed release (tag v1.0.0) ❌ by design

The one red check is the release-signing gate, and it is failing the way it was built to fail: it stops at "Resolve the signing secrets" and skips the remaining 12 steps, so nothing is produced and no debug-signed artifact is ever presented as a release. Four repository secrets and one variable are needed, and they can only be set by the owner — the keystore is deliberately not in this repository and not creatable by CI. See docs/RELEASE.md.

What works offline, end to end

Open → Create CV → Choose country → Choose CV type → Enter info → Choose template → Preview → Offline analysis → Generate PDF → Save/Share. Also: version snapshots, duplicate, archive/restore, delete, master profile, import from PDF/DOCX/TXT with a mandatory review step, JSON backup export and merge-only restore.

  • Regional rules are data, not code: assets/data/regional_rules/{iran,europe,germany,united_kingdom,united_states,international}.json. A new market is a JSON file.
  • Privacy defaults are off in every profile — date of birth, marital status, nationality, gender, photo, national ID, exact address — until the user turns them on.
  • Real PDF engine: A4 by default and US Letter for the US, multi-page with page-break rules, selectable/searchable text, embedded fonts, full Persian RTL, clickable links.
  • Analyser that explains itself: offline scoring with every finding written as problem / recommendation / priority, and no suggestion to add a skill the user does not have.
  • Compliance: privacy policy documentation, permission inventory, store checklist, QA matrix, release procedure, release notes.

Release and signing tooling

The signing key is the app's permanent identity, so the repository is built so that it cannot hold one:

  • tools/create_release_keystore.sh — the owner runs this; it refuses to write inside any git repository, passes passwords to keytool through 0600 files it shreds, and prints only non-secret values plus gh secret set commands that read from files.
  • tools/check_no_key_material.sh — fails on key material by name, by content, and on credentials written as literals; first step of both pipelines, and installable as a pre-commit hook.
  • tools/create_owner_package.sh / tools/build_release_archives.sh — the three handover packages, each verified after building rather than assumed.
  • Certificate fingerprint pinning: ANDROID_CERT_SHA256 makes the release workflow refuse an artifact signed with the wrong key.
  • Gradle/R8: Play Core references marked optional so the release build passes minification.

Known limitations, stated plainly

  • The online AI assistant is documented (docs/AI_BYOK.md) but not implemented. Nothing is faked.
  • No cloud sync; the JSON export is the mechanism.
  • Image import needs OCR, which this build does not ship.
  • Release APK/AAB in CI is debug-signed until the owner's secrets exist.
  • Store screenshots have not been produced (no Android runtime in the build environment) — recipe is in docs/STORE_CHECKLIST.md.

Arena Agent and others added 30 commits September 28, 2026 20:47
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
… i18n, shell

- Flutter 3.47.5 project skeleton generated from the official Android templates
  (AGP 9.1.0, Kotlin 2.4.0, Gradle 9.3.1, applicationId dev.cvpro.builder)
- Domain layer: enums (region, cv type, section vocabulary, industry, seniority,
  proficiency, document options), entities (resume, resume content, analysis
  report, job description, settings), and the 12-template catalogue
- Typed localisations for English, Persian (RTL) and German
- Material 3 design system: colour, typography, spacing, motion tokens
- Riverpod settings controller backed by SharedPreferences
- go_router shell with onboarding redirect and 4-tab bottom navigation
- Offline/online connectivity indicator with a dependency-free reachability probe
- Drift schema for resumes, versions, exports, analyses and job adverts
- CI: analyse, test, codegen, split-APK and AAB builds on every push

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Raw Actions logs require repository sign-in, which blocks both automated
triage and anyone working from a plain shell. Capturing the output of
`flutter analyze` and `flutter test` into a commit comment makes build
diagnostics readable through the ordinary contents API.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
- resume_content: restore the SectionKey-based datedEntriesFor, withDatedEntries
  and hasContentFor accessors (a previous edit had not persisted)
- year_month: add the missing `part 'year_month.g.dart'` directive, without
  which json_serializable silently generated nothing
- app_database: import CvType, which the drift generator needs to resolve the
  table schema
- resume_template: correct named-argument typos (`=` for `:`) that made five
  templates uncompilable
- app_router: import the settings providers
- connectivity_service: drop the Riverpod-3-only `initialValue` argument
- analysis_options: remove the deprecated `plugins` key and the pedantic
  formatting lints that generate high-volume, low-value churn
- ci: fail the build on errors and warnings, still report infos

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…stics

drift derives a row class name by stripping the trailing 's' from the table
class, so the `Resumes` table generated a class called `Resume` that shadowed
the domain entity of the same name inside the same library. All five tables now
declare @DataClassName, which is also what the mappers already assumed.

Also fixed:
- resume_content.hasContentFor: the switch did not cover SectionKey.achievements
- onboarding: add the missing regionHint resolver
- settings controller: rename update() to patch(), since AsyncNotifier already
  defines update() with different semantics
- template wireframe: drop unused parameters and simplify two conditionals
- create the asset directories the pubspec globs reference

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
- AnalysisMapper still named the pre-rename generated row class
- onboarding steps now scroll their body and pin the primary action, so the
  welcome screen no longer overflows on a 320x640 device or at large text scale
- clear the remaining analyzer infos (redundant parens, null-aware element,
  const dropdown items)
- add the regional rules loader: asset-backed, cached, and never throwing

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The offline analysis core, written as pure Dart so the same engine runs in a
unit test and on a plane:

- AnalyzerVocabulary: compiled-in action verbs, weak phrases, stop words,
  first-person markers and per-domain skill pools, extensible from
  assets/data/analyzer/vocabulary.json without touching the analyser.
- CvTextIndex: one flattened, folded view of a CV (Persian letter variants
  unified, accents folded, digits normalised) so the ATS check and the job
  match agree on what "present" means.
- AnalyzerEngine: completeness, structure, content, language, ATS and regional
  checks, each producing a Recommendation with a stable code and a priority,
  plus a score per dimension weighted by the market's ATS strictness.
- JobDescriptionAnalyzer: rule-based advert extraction (title, technologies,
  required vs nice-to-have, seniority, years, education, languages) and
  keyword matching that reports gaps without ever proposing text.
- RegionalRuleEngine: resolves a RegionalProfile and a Resume into a
  FormatPlan (printed sections, photo, paper, date system, advisories), with
  the user's own choices always winning over the convention.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The last run failed inside build_runner, and neither the raw Actions log nor
the previous diagnostics step covered that stage, so the failure was invisible
from a shell. Codegen output is now captured and published in the same commit
comment as the analyze and test output.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
json_serializable caught it first ("Can't have modifier 'final' here") and
drift_dev reported the same file as unresolvable, which is why codegen failed
before analysis could even run. Also publishes the resolved package versions
in the diagnostics comment, so pins can be tightened from CI output.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
- the job-match dimension read the score field instead of the keyword detail
- two const Recommendations depended on runtime data
- YearMonth has no isAfter; use the comparison operators it does define
- duplicate entries in two constant sets
- the CV text index widened a List to an Iterable when collecting hidden
  sections
- onboarding step now scrolls, so the welcome screen cannot overflow on a
  small phone or at a large text scale

CI now runs 'flutter analyze --fatal-warnings --no-fatal-infos': errors and
warnings block a build, style infos stay visible in the diagnostics comment
without failing it.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
An unset step output compares unequal to "0", so the gate ran and failed even
when codegen, analysis and tests had all passed. Each gated step now appends
its exit code to /tmp/codes.env and the gate reads that.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Five failures from the first full test run, each a real finding:

- an empty document scored 67 because the ATS, structure and language
  dimensions were each individually defensible. A weighted average cannot say
  'this is unfinished', so the total is now capped while critical findings
  remain, and a nearly empty document can no longer earn an ATS score on the
  strength of its layout alone
- the Europe bundle declared no date-system options
- Iranian advisory copy used the vocabulary of obligation; it now describes
  what is usual
- the copy test grepped for banned phrases and tripped over innocent English,
  so it now asserts the shape of the advice instead: no deontic vocabulary,
  and hedging language in every advisory
- the photo test depended on Iran's policy rather than on the engine, so it
  uses a synthetic market

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
A phrase such as "postgresql kubernetes" was chosen first and then suppressed
each of its words, so an advert asking for Go, PostgreSQL and Kubernetes
produced exactly two keywords, both of them title fragments, and the CV
matched neither.

Single words are now selected first — they are what a CV can match directly —
and a phrase is kept only when the vocabulary calls it a term of art
("machine learning") or when it contains a word that did not stand alone.
Terms shorter than four characters that are real technologies (Go, R, JS, AI)
are no longer filtered out.

Also declares the German bundle's date-system options and hedges the CEFR
advisory, which read as an instruction rather than as advice.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…e need

The PDF engine produces an actual text document, not a picture of one:

- every typeface is embedded from the APK, and a Latin-only family is never
  silently used for Persian: the engine resolves to Vazirmatn instead, so a
  Persian CV keeps its glyphs and its joining on a device that has never been
  online
- sections are emitted as groups and entries as nested groups, so the layout
  engine can only break between entries: never between a heading and the entry
  it introduces, never through the middle of a job
- the engine never shrinks type to make content fit. Overrunning the market's
  conventional length is reported as a warning the user acts on
- contact links become real PDF annotations; dates follow the document's
  calendar; the footer carries the candidate's name and the page number
- Jalali conversion is the exact arithmetic algorithm, valid across the whole
  range the app can display, and it runs both ways so nothing is lossy

The only plugins added are for file, print and photo plumbing: the database,
the analyser, the PDF engine and the connectivity probe are pure Dart.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The section switch is exhaustive over SectionKey, so the unhandled 'custom'
value would not have compiled. Custom sections render as their own group with
the user's own heading; Additional information stays a single paragraph so a
military-service or licence section is never printed twice.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The data layer the screens sit on:

- ResumeRepository, expressed in domain terms so no screen ever sees a Drift
  row: versioning, analyses, job adverts, export records, library backup and
  restore, and a single 'delete everything' that really deletes everything
- restoring a version snapshots the current state first, so restoring is
  itself undoable
- providers assemble the analyser's inputs — document, market rules, template
  and optional job match — in one place, which is why the score can never be
  computed from a stale draft
- the builder keeps a working copy and debounces writes, but flushes before an
  export or when the screen closes; a failed background write stays dirty
  rather than silently losing the edit

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The first run that reached the PDF layer found what the engine really offers,
and the differences are structural rather than cosmetic:

- the engine's FontWeight is only normal/bold, so the app now names the four
  weights its fonts ship in and resolves a request to the nearest real face;
  headings get SemiBold as their bold face instead of pretending to an axis
  the engine does not have
- PdfColor takes fromHex, not fromHexString, and PdfColor.fromHex reads alpha
  last, which is what the accent colours are checked against now
- pw.Row is direction-agnostic: a right-to-left document mirrors its own child
  order through one helper, and the page itself carries the text direction
- the panel's line spacing is TextStyle.height, and page guidance lives on
  plan.page, so the document metadata and the length warning both read real
  fields

Also: the analyser vocabulary is the compiled one, so the engine exists the
moment the app starts rather than after an asset read; unused imports and the
last two analyser infos are gone; AtsSafety.fromId now matches the id it
writes, so a stored 'ats_safe' template no longer reads back as 'ats_friendly'.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The document is now editable end to end:

- the builder keeps a working copy through the editor controller and writes it
  back as the user types; on a wide window the form and the finished page sit
  side by side, on a phone they are tabs
- sections are edited by shape, not by identity: five editor kinds cover the
  thirty keys in the section vocabulary, so a new section is a mapping line
- records (jobs, degrees, projects, awards, publications, references and the
  ten dated academic sections) are described once and rendered by one sheet,
  which is what keeps thirty field labels honest at the call site
- the preview renders with the same engine that exports the file and shows the
  renderer's warnings above the page — a missing photo or a length beyond the
  market's convention is something the candidate should see before sending
- export, share and print go through one service; saving a PDF also records it
  in the local export history
- eight new strings (authors, relationship, category, year, month and the three
  renderer warnings) in all three languages, and the localization contract is
  verified: all 376 getters exist in en, fa and de

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…commit

- the pdf package is imported where PdfPageFormat is named, and a photo path
  that the model allows to be absent is normalised instead of dereferenced
- record-field helpers are bounded to non-nullable entries, which is what the
  generic closures need to satisfy Object
- the choice pattern names its type argument, the empty check uses isEmpty, and
  the search-list clear sentinel is a const
- every getter in the three string files carries its @OverRide again: inserting
  the new strings had borrowed the annotation from the getter below

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
- the dashboard lists the library from the database instead of showing an
  empty state, with preview, analysis, job match, duplicate and archive on
  every card; the analyser quick actions explain themselves when no CV exists
  yet rather than opening an empty screen
- creating a CV asks only the two questions that change what the document is:
  the type decides which sections are offered, the market decides the order,
  the photo rule, the paper size and the date convention. The answers become
  the defaults for the next document
- the master profile is created on first use, so the quick action always has
  something to open
- tests for the layer that has no other guard: every section has an editor, no
  section is missing from the record catalogue, each field's reader and writer
  agree, a created record lands in the document, bullets are parsed without
  losing a mid-sentence dash, and export file names are safe

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The record copyWith helpers treat a null argument as "leave this alone", so
the editor could set a start date but never remove one: the picker's clear
button silently did nothing. Records with a nullable date now take an explicit
clear flag, and the editor's date writers pass it when the value is null.

Also stops the export file name from becoming "_.pdf" for a blank name and
blank title, and clears the analyzer's remaining lint and deprecation notes
(tearoffs instead of forwarding closures, onReorderItem instead of the
deprecated onReorder).

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The two screens that were placeholders are now the two screens the product is
sold on, and both work with no connection.

The report shows the score as what it is — an estimate from rules that ship in
the app — with the evidence under each dimension, the mechanical ATS checks,
what is already good, and every finding written as a problem plus a fix at a
stated priority. Findings link straight to the section they are about.

The job comparison pastes an advert (including from the clipboard), extracts
the title, skills and terminology on the device, and shows what the CV answers
and what it does not. A missing keyword is never turned into a suggestion to
add it: the note next to the list says to add a term only if the experience
behind it is real. Adverts are stored only when the user saves one.

The wording for all of it lives in one table with English, Persian and German
text, because the analyser reports codes and never sentences.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The import tab reads PDF, DOCX and TXT on the device: DOCX by unzipping the
container and walking the document XML, PDF by inflating the content streams
and running their text operators — including the document's own ToUnicode maps,
which is what makes text written with an embedded font come back as words
instead of glyph numbers. Images are refused with an explanation rather than
guessed at: this build ships no OCR model, and text invented from a picture
would be worse than saying so.

What comes out is a draft, not a document. The review step shows the contact
details as editable fields, every parsed entry with a delete button, and a
count of what was read from each section, because text extraction and section
guessing are heuristics and the user is the one who knows what the CV says.
Nothing is written until the confirmation button is pressed.

Also fixes a latent type hole the choice fields carried: a generic
ChoiceEntryField<T> gave its writer the runtime type (Object, SkillLevel) =>
Skill, which is not assignable to (Object, Object?) => Object — so any screen
or test that handled all choice fields uniformly would have crashed at
runtime, and one did.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
… const regexps

file_picker 13 dropped the FilePicker.platform/filePickerResult shape for
static pickers that return the file directly, so the screen now calls
FilePicker.pickFile. The section switch gained the two academic sections it
never handled, the section splitter builds its blocks instead of mutating one
(constructing a const _Block and then appending to its list would have thrown
at runtime the moment the optimiser took the const), and four regular
expressions stopped pretending to be const.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The quality job publishes its output as a commit comment because the raw
Actions log needs repository sign-in, but the Android job did not — so a
Gradle failure was invisible to anyone working from a shell. Each build step
now captures its own output and the job posts a comment with the failure, the
toolchain versions and the app's Gradle config when something goes wrong.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…package

MainActivity.kt declared 'package {{androidIdentifier}}', so every Android build
died in :app:compileDebugKotlin — the one failure the CI had never been able to
show, because the Android job was not publishing its output. With the Android
diagnostics in place the first line of the comment was the answer.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…that names the failing stage

Android release configuration
- release signing is wired from environment variables (what CI uses, fed from
  GitHub Secrets) or android/key.properties (what a developer machine uses,
  git-ignored). Neither the keystore nor a password is in the repository, and a
  build without them says so loudly in the Gradle log instead of quietly
  producing an APK signed by the debug key
- R8 keep rules for the parts of the app that are reached by name at runtime
  (the Flutter embedding, platform channels, the JNI-backed sqlite3 used by
  drift), which is the class of bug that only appears after publishing
- launcher icon: adaptive icon for Android 8+ (brand background layer, page
  mark foreground, monochrome layer for themed icons), legacy square and round
  icons for older devices, and a brand splash for both the pre-Android-12
  window and the Android 12+ system splash
- every image is generated by tools/generate_brand_assets.py from one
  description, so a brand change is one edit rather than eleven binaries

Manifest
- app label from a string resource, roundIcon, supportsRtl, explicit
  backup/data-extraction rules that include the CV database and exclude the
  generated export files. INTERNET remains the only permission
- the launcher label is now Wonder CV Builder

CI/CD
- analyze.yml, test.yml, android-release.yml, android-debug.yml. The two
  quality stages are separate so a failure names the stage that failed; the
  debug workflow keeps producing an installable APK per push, as ci.yml did
- android-release.yml refuses to run without the four signing secrets, fails
  if the tag does not match pubspec's version, verifies the built artifacts
  with tools/verify_release_artifact.sh (package, version, target SDK,
  debuggable, permissions, exported components, signature not the debug key,
  embedded secrets, cleartext traffic) and uploads them as
  wonder-cv-builder-release.apk / .aab, attaching them to a GitHub release on a
  version tag

Dependencies: dropped url_launcher, http, share_plus, crypto and bidi, which no
code imported. The remaining plugins each back a shipped feature.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…mment

The release workflow verifies the signed artifact, but the signed artifact
only exists once the signing secrets are configured. The per-push debug build
now runs the same inspection with the debug key expected, and posts the table
(identity, version, target SDK, permissions, exported components, native ABIs,
embedded-secret scan) as a commit comment — which is the only channel readable
without signing in to Actions.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The condition used hashFiles on a path outside the workspace, which always
returned empty, so a failing inspection produced a red build with no readable
reason.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The first run of the inspection reported five findings; three were the
harness's fault, and it is worth being explicit about which:

- the debug key, and a debug build's android:debuggable, are what a smoke APK
  is — reporting them as failures hid the real results
- androidx.core declares a signature-level permission for its own dynamic
  receivers; INTERNET is still the only permission the app asks for, and the
  check now says so instead of failing on a library's manifest entry
- exported components are named rather than counted, so a surprise is
  identifiable
- the secret scan no longer reads fonts: 'sk-ExtraBoldItalic' inside a bundled
  TTF matched the OpenAI key shape, and a scan that cries wolf is a scan nobody
  reads. Text-bearing files only, with tighter key patterns

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Arena Agent and others added 19 commits September 29, 2026 10:48
…s own output

Importing a PDF produced a page of garbage, and the reason was in the
extractor rather than in any font: every font's ToUnicode map in the file was
merged into one dictionary keyed by character code. That is wrong the moment a
document uses two subset fonts, because both subsets start numbering their
glyphs at 1 — so the last font read wins and half the text decodes as the
wrong characters. A second, quieter bug hid it: the maps were searched for in
the raw bytes of the file, but a CMap written by a modern producer is a
compressed stream, so the search found nothing at all and everything fell back
to a guess.

The extractor now indexes the file's objects, inflates each stream before
reading it, follows the page -> /Resources -> /Font -> /ToUnicode chain, and
tracks the font selected by each Tf operator, so every string is decoded with
the map of the font that actually drew it. Code width is decided by which
reading the map covers, instead of the old 'every high byte is zero' guess
that breaks on a subset with more than 255 glyphs. The merged map survives as
a fallback for streams that cannot be attributed to a page (object streams,
assembled resources), which is the case the old code handled correctly.

New test suite, test/pdf/pdf_rendering_test.dart, renders real documents
through the real engine with the bundled fonts and reads them back through
this same extractor, so a passing assertion means the text is genuinely in the
file, selectable and searchable rather than a picture of text:

- a one-page English CV, its contact details and a phone number intact
- a six-role CV spilling onto a second page, with the first role's content
  surviving the break, and no silent type shrinking
- Persian, asserted in logical or visual order with the presentation forms
  folded back, so the test is about the text being present rather than about
  which shaping path the renderer took
- German diacritics
- US Letter media box for the United States and never for an A4 document
- every bullet the user wrote appearing in the output
- file naming rules for the export

tools/check_dart_syntax.py is a local tokenizer check (strings, raw strings,
interpolation and comments stripped, then delimiter balance) because this
environment has no Dart SDK: it turns 'CI says line 402' into a precise answer
before a five-minute round trip.

The artifact inspection also stops crying wolf: it accepts the debug key and
debuggable on the smoke APK, names exported components instead of counting
them, ignores the androidx receiver permission, and only scans text-bearing
files for secrets — a font's 'sk-ExtraBoldItalic' metadata is not an OpenAI
key. enableOnBackInvokedCallback was dropped from the manifest because the
predictive-back behaviour it opts into cannot be verified here, and the
platform default is the safer choice when a claim cannot be tested.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The test job failed and published nothing, which is worse than a failure with
a reason. The cause: the step that records the exit code ended with 'exit 0',
so with continue-on-error its outcome was 'success' and the diagnostics step —
conditional on that outcome — was skipped. Every recording step now exits with
the code it recorded, and every publishing step runs on always() and decides
from the recorded file, which is the only arrangement that cannot silently
skip a report.

The artifact inspection also flags androidx.profileinstaller.
ProfileInstallReceiver as an unexpected exported component. It is neither:
the Flutter embedding ships it to install a baseline profile at install time,
and it is protected by android.permission.DUMP, which only a signature or
privileged app can hold. It is now named in the allowed set with the reason,
and documented in docs/PERMISSIONS.md, rather than weakened away.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Reading a Persian PDF back produced 'ﺍﺭاس' where the user wrote 'سارا', and
the first run of the new rendering tests caught it. Two things were being
ignored, both of them properties of PDF rather than bugs in this code:

- a document stores glyphs, not text: an Arabic-script letter is replaced by
  the presentation form that joins with its neighbours, so the file holds
  U+FE8D where the source held U+0627;
- a line is stored in the order it is painted, which for a right-to-left line
  is the reverse of the order it is read.

The extractor now folds the presentation forms back onto base letters — a
run-length table generated from the Unicode compatibility decomposition of the
letter-form ranges, 237 code points in 84 runs — and, for a line whose
characters are all Arabic script with punctuation and Arabic-Indic digits,
restores the reading order. Digit runs are turned back individually, because a
number reads left to right even inside a right-to-left line. A line containing
Latin text is deliberately left alone: its visual order comes from two
directions interleaved, which cannot be reconstructed from characters alone,
and a guess would corrupt the Latin half of nearly every Persian CV.

This is an import fix as much as a test fix: an imported Persian CV now
analyses the words the user actually wrote, instead of the shapes a printer
drew.

Test corrections, all of which were the test being wrong rather than the app:

- the size floor asserted 'more than 1000 bytes', which an empty document
  cannot honestly meet; the floor is about 'a real file, not a stub'
- six roles do not fill an A4 page, so the multi-page case now uses twelve
  roles with five bullets each, which does
- role end dates ran backwards (2018-03 to 2018-02), which made the fixture
  nonsense even though nothing asserted on it

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The Privacy section described two actions that did not exist: the strings for
exporting and deleting everything were written, translated into three
languages and shown to the user, while nothing was behind them. Meanwhile the
delete-all wording was the confirmation text for archiving a single CV, and
archiving is not deleting — a person who thinks they are about to lose a week
of writing cancels, which defeats the point of archiving.

- Export all data writes the whole library (CVs, versions, saved adverts,
  analyses, export records) to one indented JSON file at a location the user
  chooses through the system picker. That picker needs no storage permission,
  so the app keeps its one-permission rule. The file name is dated so two
  exports cannot collide, and a cancelled picker is silent because cancelling
  is not an error.
- Delete all data now deletes what the dialog says it deletes. The database
  rows were only half of it: generated PDFs stayed readable in the app's
  documents directory, and the file picker's cache still held copies of
  imported files. DataWipeService owns the whole action so the sentence and
  the code cannot drift apart, and the wording is exact about what survives —
  language, theme and market preferences, so the app does not bounce the user
  back into onboarding.
- The archive confirmation has its own title, body and button in all three
  languages, and its destructive button is error-coloured.

Restoring a backup is deliberately not wired yet: importLibrary exists and the
format check is tested, but a restore can overwrite a library and deserves its
own review step rather than a second meaning for the import screen. It is
recorded as outstanding in docs/PRIVACY.md and docs/QA.md rather than left as
dead code nobody has been told about.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
It said the domain model, database, builder, PDF engine, analyser and tests
were 'in progress', linked to a roadmap file that was never written and to
ci.yml which no longer exists, and named the project CV Pro while the shipped
launcher label is Wonder CV Builder. A README that is wrong about its own
status is the first thing a reviewer can catch.

It now states what is finished, what is deliberately absent (the AI assistant,
backup restore, OCR imports, freemium) with a pointer to the document that
explains each, and how to build, verify and test. Every link is checked against
the file system.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Every document this app has ever exported reported a single page: the counter
searched the produced bytes for '/Type /Page', and the writer only emits a
separator between a dictionary key and its value when the value is a number, a
boolean or a reference — a name is written flush against its key, so the file
contains '/Type/Page'. The search therefore found nothing and the fallback
returned 1.

The consequences were user-visible in three places: the preview's page
indicator, the "longer than the local convention" warning, which could never
fire, and the page count recorded against every export.

The matcher now accepts the legal forms of the separator and refuses to stop at
the prefix of '/Pages', and the page tree's own '/Count' is the fallback — the
number a reader trusts. A real 12-role document now measures as multi-page,
which is what the new PDF suite asserts.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…et line

The importer's fold table stopped at U+FBB1 because it was hand-set, and the
Farsi-yeh forms at U+FBFC–U+FBFF sit above it. The result was an imported
Persian CV where 'احمدی' came back with unreadable forms in place of the yeh —
the same class of bug as the reading-order fix, one range further along.

The table is now generated from Unicode's own compatibility decompositions by
tools/generate_arabic_table.py, so it cannot lose a range to a boundary
someone guessed at: a form is folded when its decomposition is Arabic letters
only and contains no space. That keeps the letter forms, keeps the lam-alef
ligatures, which spell two letters and appear inside ordinary Persian words
like کالا, and drops the word ligatures and diacritic stacks, which would
inject characters the user never typed.

The generator runs with --check, so a stale table can be caught the same way a
stale codegen artefact is.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The commit that switched the fold table to a generated file removed far more
than the table: a splice that replaced everything between the table's doc
comment and the next section marker also took the object index, the CMap
reader, the operator scan and the decoders with it, leaving a class whose
methods called themselves into existence. The analyzer said so precisely —
seventeen undefined methods — which is the whole reason the CI reports a
failing step and its output as a commit comment readable without signing in.

Restored from the last commit that compiled, with only the two intended edits
re-applied: the generated table is imported, the inline table and its
duplicate lazy map are gone, and everything else is exactly as it was when the
PDF suite was passing 78 of 80.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The four secrets have two common namings — the descriptive ANDROID_KEYSTORE_*
and the shorter KEYSTORE_* that most guides use — and a release that refuses
to start because of a name is a release blocked for no reason. The workflow
now resolves whichever pair is present, reports exactly which value is missing
if one is, and passes them to the build through the environment, where Actions
masks every value that came from a secret.

The keystore is still written to the runner's temporary directory and never to
the workspace, so it cannot reach an artifact or a stray git add.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
A tag-triggered release run answered the signing question definitively: there
are no signing secrets on this repository yet, and the workflow said so by
name instead of producing an APK signed with the debug key. That is the
correct behaviour and it is now the only thing standing between this build and
a publishable artifact.

The rest of the release path can still be de-risked now. R8 and resource
shrinking run only in the release variant, so a keep-rule mistake is invisible
in a debug build and appears for the first time during a real release. The
per-push workflow therefore also builds the app bundle, which is signed with
the debug key until the secrets exist (and says so in the Gradle log), and the
inspection script is given an AAB-only mode to check the result: the bundle
structure, the jarsigner verification, and the manifest inside it.

The deprecated action versions are gone with it — setup-java v4 and
upload-artifact v4 both announced their end on the last run, and a release
pipeline built on an action that no longer receives updates is a pipeline that
breaks on the day it is needed.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…bedded Python

Two bugs, both mine, both found by the run that added the release bundle to
the per-push workflow.

The AAB build failed. The step is marked continue-on-error so the job could
report everything at once, and GitHub's distinction between a step's outcome
(before continue-on-error) and its conclusion (after) meant the step displayed
as a success while my own guard turned the job red — with no log anywhere,
because the diagnostics comment only carried the APK build. The bundle's
output is now in the comment too, along with its exit code, so the next run
says why.

The artifact inspection then reported no exported component at all, which was
also the harness: the guard added for the AAB-only case re-indented the body,
and the exported-component check carries an embedded Python program inside the
shell script. Shell does not care about indentation; Python does. The guard now
wraps the block without touching a character inside it, and the extract is
compile-checked before it ships.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The diagnostics step keyed only on the debug build's exit code, so when the
release bundle failed the job went red and printed nothing — the same dead end
the earlier 'exit 0' bug produced, one layer further out. It now opens when
either build failed and includes the bundle's own output.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The release bundle failed to build, and the reason is the exact class of thing
that only appears in a release: ':app:minifyReleaseWithR8' failed with a dozen
'Missing class com.google.android.play.core...' errors. The Flutter embedding
ships deferred-components support that references Play Core, which is only on
the classpath when an app actually uses deferred components. This app does
not, so R8 — in the full mode AGP 9 runs by default — saw references to
classes that do not exist and stopped.

Found because the per-push workflow started building the release variant: this
would otherwise have surfaced for the first time while cutting a signed
release, which is the worst moment to discover it.

-dontwarn rather than a dependency: the code is unreachable here, so adding
Play Core would be shipping dead weight, and keeping the warning would hide
the next genuine missing-class error in the same package.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The AAB inspection printed 'no such APK: /dev/null' — /dev/null is not a
regular file, so the existence check rejected the sentinel before the sentinel
was interpreted, and the report table was an error line. The counters the
report functions write to were also inside the guarded block, so the first
attempt to skip the APK section died on an unbound variable. Both are ordering
mistakes in a script that was verified for the path it is normally called on
and not for the path that had just been added to it.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…signing key in the owner's hands

Three changes, all of them on the path from "it builds" to "it can be
published".

Restoring was the odd one out: the app could export everything but not read it
back, which makes the export an archive rather than a backup. The store
listing already promised the round trip, so the honest fix was to implement it
rather than to soften the claim. The restore is deliberately paranoid — a
foreign JSON, a non-object, non-UTF-8 bytes, an empty file and a file
truncated mid-write all land on the same refusal with the library untouched;
the confirmation names the number of documents the file actually contains; and
the import keeps existing CVs and updates only the identifiers it finds, so
restoring an older backup cannot silently delete newer work. Seven tests cover
the refusals, because the failure mode of a restore is not a missing feature
but a destroyed library.

The release APK is now built on every push as well, and both release artifacts
are uploaded as a 14-day smoke pair named …-UNSIGNED-smoke. The bundle and the
APK are different Gradle tasks, and Bazaar and Myket take the APK, so building
only the bundle would have left half the release path unexercised.

The release keystore is the app's permanent identity, so where it is created
matters more than how. This environment cannot create it and should not: there
is no JDK here, and a key generated in a shared, ephemeral sandbox is a key
someone else may have read — this workspace has reset to its initial commit
four times today, and a key that signs one release and is then lost can never
sign an update again. So the key is created by the owner, on the owner's
machine, by one command, and the repository is made structurally unable to
hold it:

- tools/create_release_keystore.sh generates the keystore outside any git
  repository and refuses to run inside one; passes the passwords to keytool
  through 0600 files it shreds, so they never reach ps, /proc or the shell
  history; never echoes a password; and prints only the path, the alias, the
  certificate fingerprint and gh-secret commands that read from files.
- tools/check_no_key_material.sh fails on key material by name, by content
  (PEM headers, API-key shapes, base64 that decodes to a JKS magic number) and
  on passwords written as literals. It runs in CI before anything is built,
  and --install-hook makes it a pre-commit hook. Verified against a synthetic
  repository carrying all five kinds of leak.
- the certificate SHA-256 is pinned as a repository variable
  (ANDROID_CERT_SHA256) and the release verification fails on a mismatch,
  which catches the one thing a store happily accepts: a valid, non-debug
  signature made with the wrong key. An unset pin reports "not set" rather
  than passing quietly.

docs/RELEASE.md carries the owner's procedure, the credentials record to fill
in, and the two-copy backup policy — a backup nobody has restored is a backup
nobody knows is broken.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
… and a reference

The guard's first CI run failed on its own repository, which is the useful kind
of failure: it named android/app/build.gradle.kts:82,

    storePassword = releaseStorePassword

as a committed credential. That line is a Kotlin variable holding a value read
from a Gradle property, and it is precisely how a release build is supposed to
obtain its signing password, so a guard that rejects it is a guard that gets
disabled within a week of being added.

The check now separates the two shapes it was conflating. A quoted value is a
literal wherever it appears, because a secret in quotes is a secret in the
file. An unquoted value is a literal only in properties, YAML and JSON, where
the text after the colon is data rather than a name that resolves to something
else later — which is why Gradle and Kotlin and shell are exempt from that half
and not from the first. Values that come from the environment, a command
substitution, a template placeholder or a documented example are references,
and are not reported.

Re-proved in both directions rather than assumed:

- five planted leaks, each reported: key.properties with storePassword=
  SuperSecret123 and keyPassword=hunter2, a service-account JSON, a PEM key, an
  sk-live- token in a workflow, and a quoted password in a .kts file;
- six legitimate patterns, none reported: the Gradle variable indirection
  above, ${{ secrets.* }} in a workflow, "$(read_password ...)" in a shell
  script, a placeholder JSON, a String.fromEnvironment lookup, and a docs page
  showing storePassword=your-keystore-password.

The checker skips itself in the literal pass, because it quotes the pattern it
looks for and a checker that reports its own documentation is one people learn
to ignore; the name and content passes still read it.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
… bugs that found

The script that creates the release key had never been executed. It is the one
piece of this repository whose failure mode is 'the key cannot be used', so it
was exercised against a stub keytool that stands in for the JDK this sandbox
does not have. Four real defects came out of it, each of which would have hit
the owner exactly once, at the moment the key is created:

- the section printing the four gh secret set commands was written into an
  unquoted heredoc, so the literal $p in the password instructions was expanded
  as a variable, aborted the substitution, and silently deleted the commands
  from the output. The owner would have seen a heading with nothing under it;
- the EXIT trap that shreds the temporary password files read a variable local
  to the function that set the trap. By the time it ran, the variable was out of
  scope, the trap errored, and the plaintext keystore password was left in /tmp.
  The state is now global and the files are shredded as soon as keytool is done,
  with the trap kept as the backstop for failure paths;
- a rejected password — anything under 12 characters — printed its warning to
  stdout, and the warning is captured by $( ), so it was prepended to the
  password that keytool received. Type 'short' and then a good password twice
  and the keystore was created with a password nobody typed. The warning now
  goes to stderr, and the stored password is verified to be exactly what was
  typed;
- the certificate fingerprint was parsed only in the JDK 9 spelling (SHA256:),
  so on JDK 8 it came out empty and the printed command would have pinned an
  empty value — a pin that checks nothing. Both spellings are read now, and when
  neither matches the script says so instead of printing a command that stores
  nothing.

The create flow also now prints the credentials record the owner keeps — file,
alias, application id, version read from pubspec.yaml, fingerprint, backup
slots, both passwords as named fields — so the record and the build cannot
disagree about the version.

Verified end to end against the stub: twelve assertions over the create run,
both fingerprint spellings, --check on the created keystore, the refusal to
write inside a git repository, the refusal to overwrite an existing keystore,
the short-password retry, and an EOF at the password prompt, which used to spin
in a loop forever and now exits with a sentence. No password reaches the
transcript, no password is ever a command-line argument, and no temporary
password file survives the run.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Closing the distance between 'the source is fine' and 'the thing handed to the
owner is fine'. Four artifacts leave this repository, and they are four files on
purpose: merging the key package into a source package is exactly how a signing
key ends up in an archive somebody uploads.

  WONDER_CV_BUILDER_RELEASE_KEYSTORE.zip   tools/create_owner_package.sh
  Wonder-CV-Builder-Android-v1.0.0.zip     tools/build_release_archives.sh
  Wonder-CV-Builder-v1.0.0-FINAL.zip       tools/build_release_archives.sh
  wonder-cv-builder-release.{aab,apk}      CI, on a version tag

The source archives are built from , not from a copy of the working
tree, and that choice is the safety property: an untracked file cannot be in the
archive, so a keystore — which is ignored, and therefore untracked — cannot be
in it even by accident. They are then opened again rather than trusted: tested
for a readable zip, checked for every file a build needs, checked by name for
anything that carries a secret, unpacked, and scanned by the project's own key
scanner.

That last step needed the scanner to work on something that is not a git
repository, so it gained --dir: the same checks over every file in a tree. It
still reports a real leak — a password in a properties file, an API-key shape, a
.pem, a .jks by name — and it no longer reports its own documentation when the
file sits deeper in the tree, which is what the unpacked archive exposed.

The owner package carries the key, a record with no secrets in it, checksums of
everything inside, and the instructions for wiring the key into GitHub. Encryption
is handed to Info-ZIP's own prompt, so a ZIP password goes from the owner's
keyboard into the archive and never through a variable, a pipe or a command
line. Where no key exists — a shared or disposable machine — the tool runs with
--template and produces the record plus a note saying no keystore is inside; it
does not generate a key to fill the gap, because a key made where someone else
can read the disk is a key someone else may have.

Also here: the release workflow scans for key material as its first step, before
a JDK or a Flutter SDK or a secret is touched, and the two handover directories
are git-ignored.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
The handover folder held the two source archives and nothing else, which leaves
the owner opening a zip to find the store checklist. It now also carries the
release notes, the store checklist, the privacy and release documentation, and
an index that lists every file with its size and SHA-256 so the owner can prove
what arrived is what was sent.

The copies carry one line at the top naming the repository file and the commit
they came from, because a copied document that does not say where it came from
is a document that drifts.

The index also states plainly what is not in the folder and why: no keystore,
and no signed AAB or APK. Those come from the release workflow once the signing
secrets exist — that is where the certificate is checked against the pinned
fingerprint, and where a build without the secrets stops instead of quietly
signing with the debug key.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@arena-ai-coding-agent arena-ai-coding-agent Bot changed the title CV Pro: offline-first international CV builder (Flutter) — through the import phase Wonder CV Builder 1.0.0 — release candidate (offline-first, country-aware CV builder) Sep 29, 2026
@arena-ai-coding-agent
arena-ai-coding-agent Bot merged commit 6be0322 into main Sep 29, 2026
6 of 7 checks passed
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.

0 participants