feat: extract set_fields rule forces Int fields on gff_json merge targets #40

Merged
archvillainette merged 1 commits from extract-set-fields into main 2026-07-14 16:36:41 +00:00
Owner

Adds a set_fields option to extract.merge.gff_json rules: forces existing Int fields to a fixed value on every extract, applied after preserve_fields/merge_lists so the forced value always wins. Fields absent from the document stay absent. Rule targets can now be globs (e.g. areas/*.are.json).

Motivation: sow-module area weather chances must stay 0 (scripted regional weather owns weather); this makes the extract pipeline enforce it instead of a post-extract script.

Covered by TestExtractSetsConfiguredGFFJSONFields; make check passes.

🤖 Generated with Claude Code

Adds a `set_fields` option to `extract.merge.gff_json` rules: forces existing Int fields to a fixed value on every extract, applied after preserve_fields/merge_lists so the forced value always wins. Fields absent from the document stay absent. Rule targets can now be globs (e.g. `areas/*.are.json`). Motivation: sow-module area weather chances must stay 0 (scripted regional weather owns weather); this makes the extract pipeline enforce it instead of a post-extract script. Covered by `TestExtractSetsConfiguredGFFJSONFields`; `make check` passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
archvillainette added 1 commit 2026-07-14 16:15:10 +00:00
feat: extract set_fields rule forces Int fields on gff_json merge targets
build-binaries / build-binaries (pull_request) Successful in 2m41s
test-image / build-image (pull_request) Successful in 42s
test / test (pull_request) Successful in 1m34s
3f532e43d2
Glob targets now match via matchPathPattern, so one rule can cover
areas/*.are.json. set_fields runs after preserve/merge so the forced
value always wins.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
archvillainette scheduled this pull request to auto merge when all checks succeed 2026-07-14 16:36:30 +00:00
xtul approved these changes 2026-07-14 16:36:38 +00:00
archvillainette merged commit 4ee28fee4f into main 2026-07-14 16:36:41 +00:00
archvillainette deleted branch extract-set-fields 2026-07-14 16:36:41 +00:00
Sign in to join this conversation.