# Gitea Variables Smoke Checklist

Use this after registering values in `Settings > Actions > Variables`.

## Operator Quick Run

1. Confirm the four KIS variables exist.
2. Confirm the seed snapshot exists as either `GatherTradingData.json` or `GatherTradingData.xlsx`.
3. Trigger `kis_data_collection.yml` manually.
4. Confirm the credential step passes in `--dry-run` mode.
5. Confirm the SQLite artifact is written.
6. Trigger `qualitative_sell_strategy.yml` manually.
7. Confirm the mock credential step passes in `--dry-run` mode and the batch build step resolves the same variables.
8. If any step fails, check the troubleshooting section below.

See also:

- [Runbook](/C:/Temp/data_feed/docs/GITEA_VARIABLES_RUNBOOK.md)
- [Failure Analysis](/C:/Temp/data_feed/docs/GITEA_VARIABLES_FAILURE_ANALYSIS.md)

## Variable names to verify

- `KIS_APP_KEY_TEST`
- `KIS_APP_SECRET_TEST`
- `KIS_APP_KEY`
- `KIS_APP_SECRET`

## Expected workflow consumers

- `.gitea/workflows/kis_data_collection.yml`
- `.gitea/workflows/qualitative_sell_strategy.yml`
- `.gitea/workflows/ci.yml`

## Smoke test steps

1. Open `Settings > Actions > Variables` and confirm the four KIS variables exist.
2. Trigger `.gitea/workflows/kis_data_collection.yml` with `workflow_dispatch`.
3. Check the job log for the credential validation step.
4. Check the collection step.
5. Confirm the job writes:
   - `Temp/kis_data_collection_v1.json`
   - `src/quant_engine/kis_data_collection.db`
6. Trigger `.gitea/workflows/qualitative_sell_strategy.yml`.
7. Confirm the mock credential validation step reads the same variable names.
8. Confirm the batch build step sees `KIS_APP_KEY` and `KIS_APP_SECRET`.
9. If the job fails, inspect whether the variables are missing, renamed, or empty.

## Pass criteria

- The workflow no longer references `secrets.KIS_APP_*` for KIS values.
- The job starts without variable resolution errors.
- The collector outputs are written successfully.
- The log shows the KIS credential validation step running with the configured variables.

## Troubleshooting

- Missing variable name: Gitea variable key does not match the exact `KIS_APP_*` spelling.
- Empty variable: the workflow resolves the name, but the Python loader treats the value as missing.
- Wrong scope: the variable exists in another repository or organization scope, not this repo.
- Runner mismatch: the job runs on a stale self-hosted runner cache or old workflow revision.

## Notes

- Gitea variables are repository-scoped when configured in the repo settings.
- Variable names are case-sensitive.
- Empty values behave as missing values for the Python loader.
