3 Commits
Author SHA1 Message Date
kathleen 9af9762314 Merge pull request 'Code the sheet's new answers; report failed builds as issues' (#8) from fix/new-sheet-answers-1117 into main
CI / test (push) Failing after 8s
2026-11-17 23:49:04 +00:00
kathleenandClaude Opus 5.5 6fae8a9833 Daily update: no data pull request when the combined runs failed validation
CI / test (pull_request) Failing after 1m22s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
2026-11-17 23:48:54 +00:00
kathleenandClaude Opus 5.5 47da9f1f82 Code the sheet's new answers; a failed build opens an issue instead of crashing the rebuild
The evening source check stopped (correctly) on two answers the coding rules did not know:
- first sighting "2 Greens": a new form option. Coded as Green, with a data flag that keeps the
  original answer (first_sighting_alias in core/spec/form.yaml).
- row label "Unknown" on a bulk-pasted row: added to the entry values in data/dictionary.yaml.

Workflow: when `collection update` reports the build failed, skip the rebuild (it would only fail
again) and always open the "Source check failed" issue, so new answers are reported, not lost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
2026-11-17 23:48:47 +00:00
4 changed files with 14 additions and 4 deletions
+4 -3
View File
@@ -48,7 +48,8 @@ jobs:
REDDIT_CLIENT_SECRET: ${{ secrets.REDDIT_CLIENT_SECRET }} REDDIT_CLIENT_SECRET: ${{ secrets.REDDIT_CLIENT_SECRET }}
run: python -m collection update --report "$RUNNER_TEMP/report.md" run: python -m collection update --report "$RUNNER_TEMP/report.md"
- name: Rebuild the analysis and run tests - name: Rebuild the analysis and run tests
if: steps.check.outputs.changed == 'true' # not when the combined runs failed validation: the issue below reports the new answers instead
if: steps.check.outputs.changed == 'true' && !contains(steps.check.outputs.failed, 'build')
run: | run: |
python -m collection rebuild python -m collection rebuild
npm test npm test
@@ -69,7 +70,7 @@ jobs:
path: ${{ runner.temp }}/raw-archive path: ${{ runner.temp }}/raw-archive
key: raw-archive-${{ hashFiles('data/manifest.json') }} key: raw-archive-${{ hashFiles('data/manifest.json') }}
- name: Open a pull request with the new data (it merges itself once CI passes) - name: Open a pull request with the new data (it merges itself once CI passes)
if: steps.check.outputs.changed == 'true' if: steps.check.outputs.changed == 'true' && !contains(steps.check.outputs.failed, 'build')
env: env:
ATLAS_BOT_TOKEN: ${{ secrets.ATLAS_BOT_TOKEN }} ATLAS_BOT_TOKEN: ${{ secrets.ATLAS_BOT_TOKEN }}
run: | run: |
@@ -83,7 +84,7 @@ jobs:
git push origin "$branch" git push origin "$branch"
python -m collection forge open-pr --head "$branch" --title "New data from the community sources" --body-file "$RUNNER_TEMP/report.md" --automerge python -m collection forge open-pr --head "$branch" --title "New data from the community sources" --body-file "$RUNNER_TEMP/report.md" --automerge
- name: Report a broken source or new answers - name: Report a broken source or new answers
if: steps.check.outputs.failed != '' if: always() && steps.check.outputs.failed != ''
env: env:
ATLAS_BOT_TOKEN: ${{ secrets.ATLAS_BOT_TOKEN }} ATLAS_BOT_TOKEN: ${{ secrets.ATLAS_BOT_TOKEN }}
run: | run: |
+4
View File
@@ -150,6 +150,10 @@ def code_row(r, C):
company = company_raw[: -len(suffix)] if left_squad else company_raw company = company_raw[: -len(suffix)] if left_squad else company_raw
if not left_squad and company in ("1 Squadmate", "2 Squadmates") and not (date and date >= F["left_squadmates_asked_from"]): if not left_squad and company in ("1 Squadmate", "2 Squadmates") and not (date and date >= F["left_squadmates_asked_from"]):
left_squad = None # the form did not offer "left them" yet: unknown, not "stayed together" left_squad = None # the form did not offer "left them" yet: unknown, not "stayed together"
alias = F.get("first_sighting_alias") or {}
if first in alias:
flags.append(f"first sighting answered as {first!r}")
first = alias[first]
pools = F["sighting_pool"] pools = F["sighting_pool"]
pool = list(pools.get(company, {}).get(direction, [])) + (list(pools["Alone"].get(direction, [])) if left_squad else []) pool = list(pools.get(company, {}).get(direction, [])) + (list(pools["Alone"].get(direction, [])) if left_squad else [])
if first and first != "Unsure" and pool and first not in pool: if first and first != "Unsure" and pool and first not in pool:
+5
View File
@@ -153,5 +153,10 @@ sighting_pool:
1 Squadmate: { East: [Green, Orange, Red], West: [Red, Brown, Green], Center: [Red, Brown] } 1 Squadmate: { East: [Green, Orange, Red], West: [Red, Brown, Green], Center: [Red, Brown] }
2 Squadmates: { East: [Red, Orange], West: [Green, Brown, Red], Center: [Red, Brown] } 2 Squadmates: { East: [Red, Orange], West: [Green, Brown, Red], Center: [Red, Brown] }
# First-sighting answers that are not a single colour: coded as this colour, and the row is flagged with the
# original answer (data_flags), so nothing is lost.
first_sighting_alias:
"2 Greens": Green
# How a bulk-pasted row's attempt answer is read # How a bulk-pasted row's attempt answer is read
attempt_words: { first: 1, second: 2, third: 3, fourth: 4, fifth: 5 } attempt_words: { first: 1, second: 2, third: 3, fourth: 4, fifth: 5 }
+1 -1
View File
@@ -81,7 +81,7 @@ columns:
For spreadsheet runs, the sheet's own row label: "Form" for a form submission (it has a timestamp); For spreadsheet runs, the sheet's own row label: "Form" for a form submission (it has a timestamp);
bulk-pasted logs keep the label they were pasted with. Bulk logs record every run of the players who kept bulk-pasted logs keep the label they were pasted with. Bulk logs record every run of the players who kept
them, so they are the least selectively reported rows. Empty for other sources. them, so they are the least selectively reported rows. Empty for other sources.
values: [Form, Data Import, BulkUpload3, Manual Upload, Historical import, Unknown import] values: [Form, Data Import, BulkUpload3, Manual Upload, Historical import, Unknown import, Unknown]
bot_mode: bot_mode:
type: text type: text
description: >- description: >-