# Generate Final Pack

This wrapper gives the downstream repo one stable entrypoint for rebuilding the
checked-in final merged pack.

Do not edit `packs/NOT-EDIT-final-merged-packs` by hand.

Always update the source pack first:

- `packs/Salesforce-PingCAP-L2`

Then regenerate the final pack through this wrapper:

```bash
bash packs/generate-final-pack/generate_final_pack.sh --reset
```

To reproduce the committed mirror exactly, validate its build lineage and use
the upstream and official app-pack commits recorded there:

```bash
bash packs/generate-final-pack/generate_final_pack.sh --reset --from-final-pack-lineage
```

Verify that the checked-in mirror can be reproduced from its lineage twice:

```bash
python3 scripts/verify_final_pack_regen.py --double-build
```

The verifier enforces a 60-minute runtime limit. Successful runs remove their
work directory immediately; failed runs retain it for six hours, after which a
later invocation removes it before starting new work.

The wrapper delegates to the existing authoritative builder:

- `scripts/build_pingcap_salesforce_sample_pack.sh`

It only exists to make the correct path obvious and reusable.
