{ "atom_ledger_sha256": "d8c8a7bd3e94bfdede409d752d698ddcebf7c790ec40622fcbf7ba516fa65db9", "benchmark": "deepswe", "levels": { "S0": { "atom_selection_sha256": "9610a7fb547d297ec34dc242d1482676fa9aa2aa357b89276a6d6472aaf5890c", "content_sha256": "a7322ac0994faf5dd2ba7e0d09b728d5ba3c3a4a5b833f1043554b7eadf78768", "content_text": "Inspect and edit the provided repository in /app.", "instruction_sha256": "0d3402cdf7abb4cd6156d39d1cfcc2bfd186f0332b8c080820af799d06d7eefb", "instruction_text": "Inspect and edit the provided repository in /app.\n\nIMPORTANT: Please work on this in a new branch from main and commit everything when you are done.\n", "renderer": { "mode": "deterministic", "template_sha256": null }, "selected_atom_ids": [ "a00" ], "withheld_atom_ids": [ "a_006bad3249c10a7b", "a_008ac40e85aa50b0", "a_07185677686729e3", "a_0bc440cc345c9dd7", "a_15b6e78b6a916716", "a_15d9ff28377af4e9", "a_17974a4eadcaa92f", "a_1d716aaa7195f1ae", "a_1e673f8258c1659b", "a_209225e355edd1ad", "a_212116dbd7891b70", "a_2b472edf8cf5586d", "a_3d1886bc24095575", "a_4144a8323c412f9d", "a_41847ab68ad65f3e", "a_4eb11bbd9a5f7060", "a_50c99f8faed283ad", "a_57d0bdface88a412", "a_592ef26ffa353757", "a_5a715d18ac481270", "a_60d2ae0ee46cbd4f", "a_699b1b22ca68f4a8", "a_6ccd2efc12f3f072", "a_6cf1a0bcdf475de6", "a_7355f36994acbef5", "a_7799d540f94355ec", "a_81ee2fe40687d61f", "a_8c5c36b3a14cf921", "a_8e749a4ecb22f527", "a_8f1ed8534e23e8da", "a_919f070e3829ae03", "a_95ae8078751f8efb", "a_9991f65f2ae56fd4", "a_9e31902c79566b21", "a_ac133b1b0e4fe449", "a_b05d2eb486d2946c", "a_b07a9cd688c72a7c", "a_bda9919dc7745910", "a_c01303d739ffc5e0", "a_c5004011ad773d98", "a_c74ec5d1581ad978", "a_c82c830d680f9434", "a_c8565dfdc331d92c", "a_cdbe31e7211fadae", "a_ce1a1afdc4ed9aeb", "a_ceda31b14852c483", "a_d963e8aac8ef46b0", "a_e05a4eb17acb0d1d", "a_e098321377a6a4d3", "a_e0a2503767f659ec", "a_e8b3f5821c3fe199", "a_ede92bc8552c0644", "a_f2e9f87f1d905f45", "a_f67e5e31bda69cc8", "a_f7b6d9e58d49e74c", "a_fb6522db50d17ae0", "a_fbeffb700e240bb2", "a_fcc118a09d82b634" ] }, "S1": { "atom_selection_sha256": "28d3de97ffe598353420b6cc1763c708eb219f8d6ad8d689be399fb2c066b810", "content_sha256": "b3bd6a6739a175b6fc01ffbef3ffd055f7c9d36978a69787772e0b3fb30e190a", "content_text": "Inspect and edit the provided repository in /app.\n\nImplement safe import mode for consistent, validated, recoverable database imports.", "instruction_sha256": "448aa9b4a295baa3205c28a577c4df254daddf82fd3a7bd58ef0b46848339905", "instruction_text": "Inspect and edit the provided repository in /app.\n\nImplement safe import mode for consistent, validated, recoverable database imports.\n\nIMPORTANT: Please work on this in a new branch from main and commit everything when you are done.\n", "renderer": { "model": "gpt-5.6-luna", "reasoning_effort": "max", "template_sha256": "a9a945297cda17d9129a783203aeecd78abdd6c22fa8b0f347dcb740f2582825" }, "selected_atom_ids": [ "a00", "a_4eb11bbd9a5f7060" ], "withheld_atom_ids": [ "a_006bad3249c10a7b", "a_008ac40e85aa50b0", "a_07185677686729e3", "a_0bc440cc345c9dd7", "a_15b6e78b6a916716", "a_15d9ff28377af4e9", "a_17974a4eadcaa92f", "a_1d716aaa7195f1ae", "a_1e673f8258c1659b", "a_209225e355edd1ad", "a_212116dbd7891b70", "a_2b472edf8cf5586d", "a_3d1886bc24095575", "a_4144a8323c412f9d", "a_41847ab68ad65f3e", "a_50c99f8faed283ad", "a_57d0bdface88a412", "a_592ef26ffa353757", "a_5a715d18ac481270", "a_60d2ae0ee46cbd4f", "a_699b1b22ca68f4a8", "a_6ccd2efc12f3f072", "a_6cf1a0bcdf475de6", "a_7355f36994acbef5", "a_7799d540f94355ec", "a_81ee2fe40687d61f", "a_8c5c36b3a14cf921", "a_8e749a4ecb22f527", "a_8f1ed8534e23e8da", "a_919f070e3829ae03", "a_95ae8078751f8efb", "a_9991f65f2ae56fd4", "a_9e31902c79566b21", "a_ac133b1b0e4fe449", "a_b05d2eb486d2946c", "a_b07a9cd688c72a7c", "a_bda9919dc7745910", "a_c01303d739ffc5e0", "a_c5004011ad773d98", "a_c74ec5d1581ad978", "a_c82c830d680f9434", "a_c8565dfdc331d92c", "a_cdbe31e7211fadae", "a_ce1a1afdc4ed9aeb", "a_ceda31b14852c483", "a_d963e8aac8ef46b0", "a_e05a4eb17acb0d1d", "a_e098321377a6a4d3", "a_e0a2503767f659ec", "a_e8b3f5821c3fe199", "a_ede92bc8552c0644", "a_f2e9f87f1d905f45", "a_f67e5e31bda69cc8", "a_f7b6d9e58d49e74c", "a_fb6522db50d17ae0", "a_fbeffb700e240bb2", "a_fcc118a09d82b634" ] }, "S2": { "atom_selection_sha256": "9b1789d37aad916d0ff9f56f2285813325dd70004a9279287d66725d68aaf88f", "content_sha256": "339006654545295d1d2f47d3a9c5c71538f86e4bff9f1bea533fe6ad2d0577ab", "content_text": "Inspect and edit the provided repository in /app.\n\n- Implement a safe import mode for consistent, validated, recoverable database imports.\n- A \"safe import\" mode must be implemented.\n- The \"safe import\" mode creates rollback checkpoints, validates table invariants after writes, and commits only on success.\n- On any safe-mode failure, the \"safe import\" mode must roll back to the exact pre-operation state.\n- On any safe-mode failure, the safe-mode rollback includes schema changes (tables/columns/indexes/triggers).\n\n- The Database API is `sqlite_utils.Database`.\n- The `sqlite_utils.Database` API exposes `list_import_invariants(table) -> [{id, expression}]`, `add_import_invariant(table, sql) -> invariant_id (opaque)`, `remove_import_invariant(table, invariant_id)`, and `validate_import_invariants(table) -> {valid: bool, failures: list[{id, expression, error}]}`.\n- Import invariants are persistent in the DB.\n- The `sqlite_utils.Database` API exposes `safe_bulk_insert(..., strict=False, ...)` and `safe_bulk_upsert(..., pk, strict=False)`.\n- For the `sqlite_utils.Database` API, `import_csv(table, source, safe_mode=False, strict=False)`, `source` is a path string or a text file-like.\n- The `sqlite_utils.Database` API exposes `import_csv(table, source, safe_mode=False, strict=False)` and `import_json(table, data, safe_mode=False, strict=False)`.\n- `sqlite_utils.Database` exposes `enable_safe_import()` and `disable_safe_import()`.\n\n- The `sqlite_utils.Database` API's `create_import_checkpoint()` returns `checkpoint_id`.\n- The `checkpoint_id` returned by `sqlite_utils.Database.create_import_checkpoint()` is non-empty.\n- The `sqlite_utils.Database` API exposes `cleanup_checkpoint(id)`, `commit_checkpoint(id)`, and `rollback_to_checkpoint(id)`.\n- If safe import is disabled, the `sqlite_utils.Database` API's `create_import_checkpoint()` raises `SafeImportNotEnabledError`.\n- A checkpoint commit or rollback operation finalizes a checkpoint id.\n- Further checkpoint commit or rollback operations on a finalized checkpoint id result in CheckpointNotActiveError.\n- Nested checkpoints are supported.\n- The cleanup_checkpoint operation removes the checkpoint id.\n- Unknown or cleaned checkpoint ids result in CheckpointNotFoundError.\n\n- The evaluation rule executes sql when sql starts with SELECT.\n- When evaluation executes sql that starts with SELECT, it treats the first column of the first row as truthy/falsy.\n- The evaluation rule treats sql that does not start with SELECT as an expression.\n- When evaluation treats sql as an expression, non-aggregate expressions must be true for every row.\n- When evaluation treats sql as an expression, aggregate expressions like `COUNT/SUM/AVG/MIN/MAX/...` evaluate once for the table.\n\n- With `strict=False`, the return success form is `{success: true}`.\n- With `strict=False`, the return failure form is `{success: false, checkpoint_id: str, failures: list, error_report: str}`.\n- The `failures` list in the `strict=False` failure return may be empty for non-invariant SQL/insert errors.\n- In strict mode, invariant failures must mention validation/invariants and contain one of `valid`, `validation`, or `invariant`.\n- Under `Strict`, the sequence is `rollback` then `raise`.\n\n- For the CLI, `insert/upsert/bulk` accept `--safe-mode`.\n- For the CLI, `bulk --safe-mode` must support `UPDATE`.\n- For the CLI, format flags for `insert/upsert/bulk` with `--safe-mode` are optional or inferred.\n- For the CLI, `insert/upsert/bulk --safe-mode` exits non-zero when the operation does not commit.\n- For the CLI, `insert/upsert/bulk --safe-mode` exits 0 only if the operation commits.\n- The CLI adds the `enable-safe-import` command, the `disable-safe-import` command, the `list-import-invariants` command, the `validate-import-invariants` command, the `remove-import-invariant` command, and the `add-import-invariant` command.\n- The CLI's `validate-import-invariants` command always exits 0.\n- The CLI's `validate-import-invariants` output indicates pass/fail and lists failing invariant IDs.\n- The CLI's `list-import-invariants` command prints `id + SQL`.\n- CLI docs must be updated.", "instruction_sha256": "7b40be6f6405f72bffe2496dcf9a8c8fa56d84cd5fba80fbccc2914b936b171b", "instruction_text": "Inspect and edit the provided repository in /app.\n\n- Implement a safe import mode for consistent, validated, recoverable database imports.\n- A \"safe import\" mode must be implemented.\n- The \"safe import\" mode creates rollback checkpoints, validates table invariants after writes, and commits only on success.\n- On any safe-mode failure, the \"safe import\" mode must roll back to the exact pre-operation state.\n- On any safe-mode failure, the safe-mode rollback includes schema changes (tables/columns/indexes/triggers).\n\n- The Database API is `sqlite_utils.Database`.\n- The `sqlite_utils.Database` API exposes `list_import_invariants(table) -> [{id, expression}]`, `add_import_invariant(table, sql) -> invariant_id (opaque)`, `remove_import_invariant(table, invariant_id)`, and `validate_import_invariants(table) -> {valid: bool, failures: list[{id, expression, error}]}`.\n- Import invariants are persistent in the DB.\n- The `sqlite_utils.Database` API exposes `safe_bulk_insert(..., strict=False, ...)` and `safe_bulk_upsert(..., pk, strict=False)`.\n- For the `sqlite_utils.Database` API, `import_csv(table, source, safe_mode=False, strict=False)`, `source` is a path string or a text file-like.\n- The `sqlite_utils.Database` API exposes `import_csv(table, source, safe_mode=False, strict=False)` and `import_json(table, data, safe_mode=False, strict=False)`.\n- `sqlite_utils.Database` exposes `enable_safe_import()` and `disable_safe_import()`.\n\n- The `sqlite_utils.Database` API's `create_import_checkpoint()` returns `checkpoint_id`.\n- The `checkpoint_id` returned by `sqlite_utils.Database.create_import_checkpoint()` is non-empty.\n- The `sqlite_utils.Database` API exposes `cleanup_checkpoint(id)`, `commit_checkpoint(id)`, and `rollback_to_checkpoint(id)`.\n- If safe import is disabled, the `sqlite_utils.Database` API's `create_import_checkpoint()` raises `SafeImportNotEnabledError`.\n- A checkpoint commit or rollback operation finalizes a checkpoint id.\n- Further checkpoint commit or rollback operations on a finalized checkpoint id result in CheckpointNotActiveError.\n- Nested checkpoints are supported.\n- The cleanup_checkpoint operation removes the checkpoint id.\n- Unknown or cleaned checkpoint ids result in CheckpointNotFoundError.\n\n- The evaluation rule executes sql when sql starts with SELECT.\n- When evaluation executes sql that starts with SELECT, it treats the first column of the first row as truthy/falsy.\n- The evaluation rule treats sql that does not start with SELECT as an expression.\n- When evaluation treats sql as an expression, non-aggregate expressions must be true for every row.\n- When evaluation treats sql as an expression, aggregate expressions like `COUNT/SUM/AVG/MIN/MAX/...` evaluate once for the table.\n\n- With `strict=False`, the return success form is `{success: true}`.\n- With `strict=False`, the return failure form is `{success: false, checkpoint_id: str, failures: list, error_report: str}`.\n- The `failures` list in the `strict=False` failure return may be empty for non-invariant SQL/insert errors.\n- In strict mode, invariant failures must mention validation/invariants and contain one of `valid`, `validation`, or `invariant`.\n- Under `Strict`, the sequence is `rollback` then `raise`.\n\n- For the CLI, `insert/upsert/bulk` accept `--safe-mode`.\n- For the CLI, `bulk --safe-mode` must support `UPDATE`.\n- For the CLI, format flags for `insert/upsert/bulk` with `--safe-mode` are optional or inferred.\n- For the CLI, `insert/upsert/bulk --safe-mode` exits non-zero when the operation does not commit.\n- For the CLI, `insert/upsert/bulk --safe-mode` exits 0 only if the operation commits.\n- The CLI adds the `enable-safe-import` command, the `disable-safe-import` command, the `list-import-invariants` command, the `validate-import-invariants` command, the `remove-import-invariant` command, and the `add-import-invariant` command.\n- The CLI's `validate-import-invariants` command always exits 0.\n- The CLI's `validate-import-invariants` output indicates pass/fail and lists failing invariant IDs.\n- The CLI's `list-import-invariants` command prints `id + SQL`.\n- CLI docs must be updated.\n\nIMPORTANT: Please work on this in a new branch from main and commit everything when you are done.\n", "renderer": { "model": "gpt-5.6-luna", "reasoning_effort": "max", "template_sha256": "a9a945297cda17d9129a783203aeecd78abdd6c22fa8b0f347dcb740f2582825" }, "selected_atom_ids": [ "a00", "a_4eb11bbd9a5f7060", "a_1e673f8258c1659b", "a_6ccd2efc12f3f072", "a_6cf1a0bcdf475de6", "a_9e31902c79566b21", "a_b07a9cd688c72a7c", "a_e098321377a6a4d3", "a_15b6e78b6a916716", "a_15d9ff28377af4e9", "a_1d716aaa7195f1ae", "a_212116dbd7891b70", "a_3d1886bc24095575", "a_60d2ae0ee46cbd4f", "a_7799d540f94355ec", "a_81ee2fe40687d61f", "a_95ae8078751f8efb", "a_9991f65f2ae56fd4", "a_c01303d739ffc5e0", "a_c5004011ad773d98", "a_c74ec5d1581ad978", "a_ceda31b14852c483", "a_e0a2503767f659ec", "a_f67e5e31bda69cc8", "a_f7b6d9e58d49e74c", "a_fbeffb700e240bb2", "a_008ac40e85aa50b0", "a_209225e355edd1ad", "a_5a715d18ac481270", "a_bda9919dc7745910", "a_c8565dfdc331d92c", "a_8c5c36b3a14cf921", "a_0bc440cc345c9dd7", "a_2b472edf8cf5586d", "a_57d0bdface88a412", "a_699b1b22ca68f4a8", "a_d963e8aac8ef46b0", "a_592ef26ffa353757", "a_b05d2eb486d2946c", "a_fcc118a09d82b634", "a_7355f36994acbef5", "a_ce1a1afdc4ed9aeb", "a_006bad3249c10a7b", "a_07185677686729e3", "a_17974a4eadcaa92f", "a_4144a8323c412f9d", "a_41847ab68ad65f3e", "a_50c99f8faed283ad", "a_8e749a4ecb22f527", "a_8f1ed8534e23e8da", "a_ac133b1b0e4fe449", "a_c82c830d680f9434", "a_cdbe31e7211fadae", "a_e8b3f5821c3fe199", "a_ede92bc8552c0644", "a_f2e9f87f1d905f45", "a_fb6522db50d17ae0", "a_919f070e3829ae03" ], "withheld_atom_ids": [ "a_e05a4eb17acb0d1d" ] }, "S3": { "atom_selection_sha256": "c31b0dd07be4ec80ced11d5240cd1135e47f22212457755418975cc7ff683927", "content_sha256": "29043cca2263533f470ddfd6446f58e08931d52631fb4870c66bf4e33e643441", "content_text": "Inspect and edit the provided repository in /app.\n\n- Implement safe import mode for consistent, validated, recoverable database imports.\n- Bulk imports can partially fail, leaving databases inconsistent.\n- On any safe-mode failure, the \"safe import\" mode must roll back to the exact pre-operation state.\n- The \"safe import\" mode validates table invariants after writes.\n- The \"safe import\" mode creates rollback checkpoints.\n- A \"safe import\" mode must be implemented.\n- The \"safe import\" mode commits only on success.\n- On any safe-mode failure, the safe-mode rollback includes schema changes (tables/columns/indexes/triggers).\n\n- The `sqlite_utils.Database` API exposes `list_import_invariants(table) -> [{id, expression}]`.\n- The `sqlite_utils.Database` API's `create_import_checkpoint()` returns `checkpoint_id`.\n- The `sqlite_utils.Database` API exposes `cleanup_checkpoint(id)`.\n- The `sqlite_utils.Database` API exposes `safe_bulk_insert(..., strict=False, ...)`.\n- `sqlite_utils.Database` exposes `disable_safe_import()`.\n- For the `sqlite_utils.Database` API, `import_csv(table, source, safe_mode=False, strict=False)`, `source` is a path string or a text file-like.\n- The `sqlite_utils.Database` API exposes `remove_import_invariant(table, invariant_id)`.\n- If safe import is disabled, the `sqlite_utils.Database` API's `create_import_checkpoint()` raises `SafeImportNotEnabledError`.\n- The `sqlite_utils.Database` API exposes `commit_checkpoint(id)`.\n- The `checkpoint_id` returned by `sqlite_utils.Database.create_import_checkpoint()` is non-empty.\n- The `sqlite_utils.Database` API exposes `safe_bulk_upsert(..., pk, strict=False)`.\n- The `sqlite_utils.Database` API exposes `import_csv(table, source, safe_mode=False, strict=False)`.\n- The `sqlite_utils.Database` API exposes `add_import_invariant(table, sql) -> invariant_id (opaque)`.\n- The `sqlite_utils.Database` API exposes `rollback_to_checkpoint(id)`.\n- `sqlite_utils.Database` exposes `enable_safe_import()`.\n- The `sqlite_utils.Database` API exposes `import_json(table, data, safe_mode=False, strict=False)`.\n- The `sqlite_utils.Database` API exposes `validate_import_invariants(table) -> {valid: bool, failures: list[{id, expression, error}]}`.\n- The Database API is `sqlite_utils.Database`.\n\n- Further checkpoint commit or rollback operations on a finalized checkpoint id result in CheckpointNotActiveError.\n- A checkpoint commit or rollback operation finalizes a checkpoint id.\n- Nested checkpoints are supported.\n- The cleanup_checkpoint operation removes the checkpoint id.\n- Unknown or cleaned checkpoint ids result in CheckpointNotFoundError.\n- Import invariants are persistent in the DB.\n\n- The evaluation rule executes sql when sql starts with SELECT.\n- When evaluation treats sql as an expression, aggregate expressions like COUNT/SUM/AVG/MIN/MAX/... evaluate once for the table.\n- When evaluation executes sql that starts with SELECT, it treats the first column of the first row as truthy/falsy.\n- When evaluation treats sql as an expression, non-aggregate expressions must be true for every row.\n- The evaluation rule treats sql that does not start with SELECT as an expression.\n\n- The `failures` list in the `strict=False` failure return may be empty for non-invariant SQL/insert errors.\n- With `strict=False`, the return failure form is `{success: false, checkpoint_id: str, failures: list, error_report: str}`.\n- With `strict=False`, the return success form is `{success: true}`.\n- In strict mode, invariant failures must mention validation/invariants and contain one of `valid`, `validation`, or `invariant`.\n- Under `Strict`, the sequence is `rollback` then `raise`.\n\n- For the CLI, `insert/upsert/bulk` accept `--safe-mode`.\n- The CLI's `validate-import-invariants` command always exits 0.\n- For the CLI, `bulk --safe-mode` must support `UPDATE`.\n- For the CLI, `insert/upsert/bulk --safe-mode` exits non-zero when the operation does not commit.\n- The CLI's `validate-import-invariants` output indicates pass/fail.\n- The CLI adds the `enable-safe-import` command.\n- For the CLI, format flags for `insert/upsert/bulk` with `--safe-mode` are optional or inferred.\n- The CLI adds the `list-import-invariants` command.\n- The CLI's `validate-import-invariants` output lists failing invariant IDs.\n- The CLI adds the `disable-safe-import` command.\n- For the CLI, `insert/upsert/bulk --safe-mode` exits 0 only if the operation commits.\n- The CLI adds the `validate-import-invariants` command.\n- The CLI adds the `remove-import-invariant` command.\n- The CLI's `list-import-invariants` command prints `id + SQL`.\n- The CLI adds the `add-import-invariant` command.\n- CLI docs must be updated.", "instruction_sha256": "a5274e7b94120e2c1efc65ffff3acb101bcd21ecc4cc09fe0e38595ab452bcdf", "instruction_text": "Inspect and edit the provided repository in /app.\n\n- Implement safe import mode for consistent, validated, recoverable database imports.\n- Bulk imports can partially fail, leaving databases inconsistent.\n- On any safe-mode failure, the \"safe import\" mode must roll back to the exact pre-operation state.\n- The \"safe import\" mode validates table invariants after writes.\n- The \"safe import\" mode creates rollback checkpoints.\n- A \"safe import\" mode must be implemented.\n- The \"safe import\" mode commits only on success.\n- On any safe-mode failure, the safe-mode rollback includes schema changes (tables/columns/indexes/triggers).\n\n- The `sqlite_utils.Database` API exposes `list_import_invariants(table) -> [{id, expression}]`.\n- The `sqlite_utils.Database` API's `create_import_checkpoint()` returns `checkpoint_id`.\n- The `sqlite_utils.Database` API exposes `cleanup_checkpoint(id)`.\n- The `sqlite_utils.Database` API exposes `safe_bulk_insert(..., strict=False, ...)`.\n- `sqlite_utils.Database` exposes `disable_safe_import()`.\n- For the `sqlite_utils.Database` API, `import_csv(table, source, safe_mode=False, strict=False)`, `source` is a path string or a text file-like.\n- The `sqlite_utils.Database` API exposes `remove_import_invariant(table, invariant_id)`.\n- If safe import is disabled, the `sqlite_utils.Database` API's `create_import_checkpoint()` raises `SafeImportNotEnabledError`.\n- The `sqlite_utils.Database` API exposes `commit_checkpoint(id)`.\n- The `checkpoint_id` returned by `sqlite_utils.Database.create_import_checkpoint()` is non-empty.\n- The `sqlite_utils.Database` API exposes `safe_bulk_upsert(..., pk, strict=False)`.\n- The `sqlite_utils.Database` API exposes `import_csv(table, source, safe_mode=False, strict=False)`.\n- The `sqlite_utils.Database` API exposes `add_import_invariant(table, sql) -> invariant_id (opaque)`.\n- The `sqlite_utils.Database` API exposes `rollback_to_checkpoint(id)`.\n- `sqlite_utils.Database` exposes `enable_safe_import()`.\n- The `sqlite_utils.Database` API exposes `import_json(table, data, safe_mode=False, strict=False)`.\n- The `sqlite_utils.Database` API exposes `validate_import_invariants(table) -> {valid: bool, failures: list[{id, expression, error}]}`.\n- The Database API is `sqlite_utils.Database`.\n\n- Further checkpoint commit or rollback operations on a finalized checkpoint id result in CheckpointNotActiveError.\n- A checkpoint commit or rollback operation finalizes a checkpoint id.\n- Nested checkpoints are supported.\n- The cleanup_checkpoint operation removes the checkpoint id.\n- Unknown or cleaned checkpoint ids result in CheckpointNotFoundError.\n- Import invariants are persistent in the DB.\n\n- The evaluation rule executes sql when sql starts with SELECT.\n- When evaluation treats sql as an expression, aggregate expressions like COUNT/SUM/AVG/MIN/MAX/... evaluate once for the table.\n- When evaluation executes sql that starts with SELECT, it treats the first column of the first row as truthy/falsy.\n- When evaluation treats sql as an expression, non-aggregate expressions must be true for every row.\n- The evaluation rule treats sql that does not start with SELECT as an expression.\n\n- The `failures` list in the `strict=False` failure return may be empty for non-invariant SQL/insert errors.\n- With `strict=False`, the return failure form is `{success: false, checkpoint_id: str, failures: list, error_report: str}`.\n- With `strict=False`, the return success form is `{success: true}`.\n- In strict mode, invariant failures must mention validation/invariants and contain one of `valid`, `validation`, or `invariant`.\n- Under `Strict`, the sequence is `rollback` then `raise`.\n\n- For the CLI, `insert/upsert/bulk` accept `--safe-mode`.\n- The CLI's `validate-import-invariants` command always exits 0.\n- For the CLI, `bulk --safe-mode` must support `UPDATE`.\n- For the CLI, `insert/upsert/bulk --safe-mode` exits non-zero when the operation does not commit.\n- The CLI's `validate-import-invariants` output indicates pass/fail.\n- The CLI adds the `enable-safe-import` command.\n- For the CLI, format flags for `insert/upsert/bulk` with `--safe-mode` are optional or inferred.\n- The CLI adds the `list-import-invariants` command.\n- The CLI's `validate-import-invariants` output lists failing invariant IDs.\n- The CLI adds the `disable-safe-import` command.\n- For the CLI, `insert/upsert/bulk --safe-mode` exits 0 only if the operation commits.\n- The CLI adds the `validate-import-invariants` command.\n- The CLI adds the `remove-import-invariant` command.\n- The CLI's `list-import-invariants` command prints `id + SQL`.\n- The CLI adds the `add-import-invariant` command.\n- CLI docs must be updated.\n\nIMPORTANT: Please work on this in a new branch from main and commit everything when you are done.\n", "renderer": { "model": "gpt-5.6-luna", "reasoning_effort": "max", "template_sha256": "a9a945297cda17d9129a783203aeecd78abdd6c22fa8b0f347dcb740f2582825" }, "selected_atom_ids": [ "a00", "a_4eb11bbd9a5f7060", "a_e05a4eb17acb0d1d", "a_1e673f8258c1659b", "a_6ccd2efc12f3f072", "a_6cf1a0bcdf475de6", "a_9e31902c79566b21", "a_b07a9cd688c72a7c", "a_e098321377a6a4d3", "a_15b6e78b6a916716", "a_15d9ff28377af4e9", "a_1d716aaa7195f1ae", "a_212116dbd7891b70", "a_3d1886bc24095575", "a_60d2ae0ee46cbd4f", "a_7799d540f94355ec", "a_81ee2fe40687d61f", "a_95ae8078751f8efb", "a_9991f65f2ae56fd4", "a_c01303d739ffc5e0", "a_c5004011ad773d98", "a_c74ec5d1581ad978", "a_ceda31b14852c483", "a_e0a2503767f659ec", "a_f67e5e31bda69cc8", "a_f7b6d9e58d49e74c", "a_fbeffb700e240bb2", "a_008ac40e85aa50b0", "a_209225e355edd1ad", "a_5a715d18ac481270", "a_bda9919dc7745910", "a_c8565dfdc331d92c", "a_8c5c36b3a14cf921", "a_0bc440cc345c9dd7", "a_2b472edf8cf5586d", "a_57d0bdface88a412", "a_699b1b22ca68f4a8", "a_d963e8aac8ef46b0", "a_592ef26ffa353757", "a_b05d2eb486d2946c", "a_fcc118a09d82b634", "a_7355f36994acbef5", "a_ce1a1afdc4ed9aeb", "a_006bad3249c10a7b", "a_07185677686729e3", "a_17974a4eadcaa92f", "a_4144a8323c412f9d", "a_41847ab68ad65f3e", "a_50c99f8faed283ad", "a_8e749a4ecb22f527", "a_8f1ed8534e23e8da", "a_ac133b1b0e4fe449", "a_c82c830d680f9434", "a_cdbe31e7211fadae", "a_e8b3f5821c3fe199", "a_ede92bc8552c0644", "a_f2e9f87f1d905f45", "a_fb6522db50d17ae0", "a_919f070e3829ae03" ], "withheld_atom_ids": [] }, "S4": { "atom_selection_sha256": "c31b0dd07be4ec80ced11d5240cd1135e47f22212457755418975cc7ff683927", "content_sha256": "29043cca2263533f470ddfd6446f58e08931d52631fb4870c66bf4e33e643441", "content_text": "Inspect and edit the provided repository in /app.\n\n- Implement safe import mode for consistent, validated, recoverable database imports.\n- Bulk imports can partially fail, leaving databases inconsistent.\n- On any safe-mode failure, the \"safe import\" mode must roll back to the exact pre-operation state.\n- The \"safe import\" mode validates table invariants after writes.\n- The \"safe import\" mode creates rollback checkpoints.\n- A \"safe import\" mode must be implemented.\n- The \"safe import\" mode commits only on success.\n- On any safe-mode failure, the safe-mode rollback includes schema changes (tables/columns/indexes/triggers).\n\n- The `sqlite_utils.Database` API exposes `list_import_invariants(table) -> [{id, expression}]`.\n- The `sqlite_utils.Database` API's `create_import_checkpoint()` returns `checkpoint_id`.\n- The `sqlite_utils.Database` API exposes `cleanup_checkpoint(id)`.\n- The `sqlite_utils.Database` API exposes `safe_bulk_insert(..., strict=False, ...)`.\n- `sqlite_utils.Database` exposes `disable_safe_import()`.\n- For the `sqlite_utils.Database` API, `import_csv(table, source, safe_mode=False, strict=False)`, `source` is a path string or a text file-like.\n- The `sqlite_utils.Database` API exposes `remove_import_invariant(table, invariant_id)`.\n- If safe import is disabled, the `sqlite_utils.Database` API's `create_import_checkpoint()` raises `SafeImportNotEnabledError`.\n- The `sqlite_utils.Database` API exposes `commit_checkpoint(id)`.\n- The `checkpoint_id` returned by `sqlite_utils.Database.create_import_checkpoint()` is non-empty.\n- The `sqlite_utils.Database` API exposes `safe_bulk_upsert(..., pk, strict=False)`.\n- The `sqlite_utils.Database` API exposes `import_csv(table, source, safe_mode=False, strict=False)`.\n- The `sqlite_utils.Database` API exposes `add_import_invariant(table, sql) -> invariant_id (opaque)`.\n- The `sqlite_utils.Database` API exposes `rollback_to_checkpoint(id)`.\n- `sqlite_utils.Database` exposes `enable_safe_import()`.\n- The `sqlite_utils.Database` API exposes `import_json(table, data, safe_mode=False, strict=False)`.\n- The `sqlite_utils.Database` API exposes `validate_import_invariants(table) -> {valid: bool, failures: list[{id, expression, error}]}`.\n- The Database API is `sqlite_utils.Database`.\n\n- Further checkpoint commit or rollback operations on a finalized checkpoint id result in CheckpointNotActiveError.\n- A checkpoint commit or rollback operation finalizes a checkpoint id.\n- Nested checkpoints are supported.\n- The cleanup_checkpoint operation removes the checkpoint id.\n- Unknown or cleaned checkpoint ids result in CheckpointNotFoundError.\n- Import invariants are persistent in the DB.\n\n- The evaluation rule executes sql when sql starts with SELECT.\n- When evaluation treats sql as an expression, aggregate expressions like COUNT/SUM/AVG/MIN/MAX/... evaluate once for the table.\n- When evaluation executes sql that starts with SELECT, it treats the first column of the first row as truthy/falsy.\n- When evaluation treats sql as an expression, non-aggregate expressions must be true for every row.\n- The evaluation rule treats sql that does not start with SELECT as an expression.\n\n- The `failures` list in the `strict=False` failure return may be empty for non-invariant SQL/insert errors.\n- With `strict=False`, the return failure form is `{success: false, checkpoint_id: str, failures: list, error_report: str}`.\n- With `strict=False`, the return success form is `{success: true}`.\n- In strict mode, invariant failures must mention validation/invariants and contain one of `valid`, `validation`, or `invariant`.\n- Under `Strict`, the sequence is `rollback` then `raise`.\n\n- For the CLI, `insert/upsert/bulk` accept `--safe-mode`.\n- The CLI's `validate-import-invariants` command always exits 0.\n- For the CLI, `bulk --safe-mode` must support `UPDATE`.\n- For the CLI, `insert/upsert/bulk --safe-mode` exits non-zero when the operation does not commit.\n- The CLI's `validate-import-invariants` output indicates pass/fail.\n- The CLI adds the `enable-safe-import` command.\n- For the CLI, format flags for `insert/upsert/bulk` with `--safe-mode` are optional or inferred.\n- The CLI adds the `list-import-invariants` command.\n- The CLI's `validate-import-invariants` output lists failing invariant IDs.\n- The CLI adds the `disable-safe-import` command.\n- For the CLI, `insert/upsert/bulk --safe-mode` exits 0 only if the operation commits.\n- The CLI adds the `validate-import-invariants` command.\n- The CLI adds the `remove-import-invariant` command.\n- The CLI's `list-import-invariants` command prints `id + SQL`.\n- The CLI adds the `add-import-invariant` command.\n- CLI docs must be updated.", "instruction_sha256": "a5274e7b94120e2c1efc65ffff3acb101bcd21ecc4cc09fe0e38595ab452bcdf", "instruction_text": "Inspect and edit the provided repository in /app.\n\n- Implement safe import mode for consistent, validated, recoverable database imports.\n- Bulk imports can partially fail, leaving databases inconsistent.\n- On any safe-mode failure, the \"safe import\" mode must roll back to the exact pre-operation state.\n- The \"safe import\" mode validates table invariants after writes.\n- The \"safe import\" mode creates rollback checkpoints.\n- A \"safe import\" mode must be implemented.\n- The \"safe import\" mode commits only on success.\n- On any safe-mode failure, the safe-mode rollback includes schema changes (tables/columns/indexes/triggers).\n\n- The `sqlite_utils.Database` API exposes `list_import_invariants(table) -> [{id, expression}]`.\n- The `sqlite_utils.Database` API's `create_import_checkpoint()` returns `checkpoint_id`.\n- The `sqlite_utils.Database` API exposes `cleanup_checkpoint(id)`.\n- The `sqlite_utils.Database` API exposes `safe_bulk_insert(..., strict=False, ...)`.\n- `sqlite_utils.Database` exposes `disable_safe_import()`.\n- For the `sqlite_utils.Database` API, `import_csv(table, source, safe_mode=False, strict=False)`, `source` is a path string or a text file-like.\n- The `sqlite_utils.Database` API exposes `remove_import_invariant(table, invariant_id)`.\n- If safe import is disabled, the `sqlite_utils.Database` API's `create_import_checkpoint()` raises `SafeImportNotEnabledError`.\n- The `sqlite_utils.Database` API exposes `commit_checkpoint(id)`.\n- The `checkpoint_id` returned by `sqlite_utils.Database.create_import_checkpoint()` is non-empty.\n- The `sqlite_utils.Database` API exposes `safe_bulk_upsert(..., pk, strict=False)`.\n- The `sqlite_utils.Database` API exposes `import_csv(table, source, safe_mode=False, strict=False)`.\n- The `sqlite_utils.Database` API exposes `add_import_invariant(table, sql) -> invariant_id (opaque)`.\n- The `sqlite_utils.Database` API exposes `rollback_to_checkpoint(id)`.\n- `sqlite_utils.Database` exposes `enable_safe_import()`.\n- The `sqlite_utils.Database` API exposes `import_json(table, data, safe_mode=False, strict=False)`.\n- The `sqlite_utils.Database` API exposes `validate_import_invariants(table) -> {valid: bool, failures: list[{id, expression, error}]}`.\n- The Database API is `sqlite_utils.Database`.\n\n- Further checkpoint commit or rollback operations on a finalized checkpoint id result in CheckpointNotActiveError.\n- A checkpoint commit or rollback operation finalizes a checkpoint id.\n- Nested checkpoints are supported.\n- The cleanup_checkpoint operation removes the checkpoint id.\n- Unknown or cleaned checkpoint ids result in CheckpointNotFoundError.\n- Import invariants are persistent in the DB.\n\n- The evaluation rule executes sql when sql starts with SELECT.\n- When evaluation treats sql as an expression, aggregate expressions like COUNT/SUM/AVG/MIN/MAX/... evaluate once for the table.\n- When evaluation executes sql that starts with SELECT, it treats the first column of the first row as truthy/falsy.\n- When evaluation treats sql as an expression, non-aggregate expressions must be true for every row.\n- The evaluation rule treats sql that does not start with SELECT as an expression.\n\n- The `failures` list in the `strict=False` failure return may be empty for non-invariant SQL/insert errors.\n- With `strict=False`, the return failure form is `{success: false, checkpoint_id: str, failures: list, error_report: str}`.\n- With `strict=False`, the return success form is `{success: true}`.\n- In strict mode, invariant failures must mention validation/invariants and contain one of `valid`, `validation`, or `invariant`.\n- Under `Strict`, the sequence is `rollback` then `raise`.\n\n- For the CLI, `insert/upsert/bulk` accept `--safe-mode`.\n- The CLI's `validate-import-invariants` command always exits 0.\n- For the CLI, `bulk --safe-mode` must support `UPDATE`.\n- For the CLI, `insert/upsert/bulk --safe-mode` exits non-zero when the operation does not commit.\n- The CLI's `validate-import-invariants` output indicates pass/fail.\n- The CLI adds the `enable-safe-import` command.\n- For the CLI, format flags for `insert/upsert/bulk` with `--safe-mode` are optional or inferred.\n- The CLI adds the `list-import-invariants` command.\n- The CLI's `validate-import-invariants` output lists failing invariant IDs.\n- The CLI adds the `disable-safe-import` command.\n- For the CLI, `insert/upsert/bulk --safe-mode` exits 0 only if the operation commits.\n- The CLI adds the `validate-import-invariants` command.\n- The CLI adds the `remove-import-invariant` command.\n- The CLI's `list-import-invariants` command prints `id + SQL`.\n- The CLI adds the `add-import-invariant` command.\n- CLI docs must be updated.\n\nIMPORTANT: Please work on this in a new branch from main and commit everything when you are done.\n", "renderer": { "model": "gpt-5.6-luna", "reasoning_effort": "max", "template_sha256": "a9a945297cda17d9129a783203aeecd78abdd6c22fa8b0f347dcb740f2582825" }, "selected_atom_ids": [ "a00", "a_4eb11bbd9a5f7060", "a_e05a4eb17acb0d1d", "a_1e673f8258c1659b", "a_6ccd2efc12f3f072", "a_6cf1a0bcdf475de6", "a_9e31902c79566b21", "a_b07a9cd688c72a7c", "a_e098321377a6a4d3", "a_15b6e78b6a916716", "a_15d9ff28377af4e9", "a_1d716aaa7195f1ae", "a_212116dbd7891b70", "a_3d1886bc24095575", "a_60d2ae0ee46cbd4f", "a_7799d540f94355ec", "a_81ee2fe40687d61f", "a_95ae8078751f8efb", "a_9991f65f2ae56fd4", "a_c01303d739ffc5e0", "a_c5004011ad773d98", "a_c74ec5d1581ad978", "a_ceda31b14852c483", "a_e0a2503767f659ec", "a_f67e5e31bda69cc8", "a_f7b6d9e58d49e74c", "a_fbeffb700e240bb2", "a_008ac40e85aa50b0", "a_209225e355edd1ad", "a_5a715d18ac481270", "a_bda9919dc7745910", "a_c8565dfdc331d92c", "a_8c5c36b3a14cf921", "a_0bc440cc345c9dd7", "a_2b472edf8cf5586d", "a_57d0bdface88a412", "a_699b1b22ca68f4a8", "a_d963e8aac8ef46b0", "a_592ef26ffa353757", "a_b05d2eb486d2946c", "a_fcc118a09d82b634", "a_7355f36994acbef5", "a_ce1a1afdc4ed9aeb", "a_006bad3249c10a7b", "a_07185677686729e3", "a_17974a4eadcaa92f", "a_4144a8323c412f9d", "a_41847ab68ad65f3e", "a_50c99f8faed283ad", "a_8e749a4ecb22f527", "a_8f1ed8534e23e8da", "a_ac133b1b0e4fe449", "a_c82c830d680f9434", "a_cdbe31e7211fadae", "a_e8b3f5821c3fe199", "a_ede92bc8552c0644", "a_f2e9f87f1d905f45", "a_fb6522db50d17ae0", "a_919f070e3829ae03" ], "withheld_atom_ids": [] } }, "objective_atom_id": "a_4eb11bbd9a5f7060", "protocol_fingerprint": { "kind": "trailing_lines", "lines_sha256": "56fa373e0b23716665edb58a2a5ba5d86f09791b540ad33bae0bf85f1ad2eb64", "prefix_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "suffix_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" }, "release_id": "si25-rebuilt-v1", "schema_version": "interactive-coding-dataset-v1", "source_adjudication_ids": [], "task_id": "sqlite-utils-safe-import-checkpoints" }