Skip to content

test(config): skip research-edition guards when AW_RESEARCH_EDITION=true - #143

Merged
ErikBjare merged 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:research-aware-guards
Sep 7, 2026
Merged

test(config): skip research-edition guards when AW_RESEARCH_EDITION=true#143
ErikBjare merged 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:research-aware-guards

Conversation

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

The bundle's Research Edition release (v0.14.0b5-research, run 34155142876) failed on every job, both matrices, all platforms. release.yml runs patch -> build -> test: scripts/patch_research_edition_config.py flips research_enabled's default to true before make test, and two guards added in #138 assert the pristine (non-research) defaults — test_research_edition_sed_target_is_intact (asserts the literal research_enabled = false sed target is present/unindented — false by construction once the patch has run) and test_parse_args_defaults_research_off_without_config (asserts research is off by default — the patch turns it on). Both guards are valuable on standard/PR CI and should stay; they just shouldn't fire on the build they exist to enable.

This skips both via AW_RESEARCH_EDITION=true, which release.yml already sets at job level for research builds and which make test inherits — no reordering of release.yml's patch/build/test steps needed, and the guards keep protecting standard/PR CI from accidental drift in config.py. Companion bundle PR: ActivityWatch/activitywatch#1434 (research profile wiring). The bundle's next research recut will need to bump this submodule pin to pick up this fix before make test can pass again on that lineage.

The bundle's Research Edition release (v0.14.0b5-research, run 34155142876)
failed on every job because release.yml runs patch -> build -> test:
scripts/patch_research_edition_config.py flips research_enabled's default to
true before `make test` runs, and two guards added in ActivityWatch#138 assert the
pristine (non-research) defaults:

- test_research_edition_sed_target_is_intact asserts the literal
  `research_enabled = false` sed target is present and unindented — false by
  construction once the research patch has run.
- test_parse_args_defaults_research_off_without_config asserts research is
  off by default — the research patch turns it on.

Both guards are valuable on standard/PR CI (they catch accidental drift in
config.py that would silently break the release patch or ship research
defaults to normal users) and must stay in place there. They just shouldn't
fire on the very build they exist to protect.

Skip both via AW_RESEARCH_EDITION=true, which release.yml already sets at
job level for research builds and which `make test` inherits. Verified
locally: plain pytest still runs and passes both guards; with
AW_RESEARCH_EDITION=true they skip cleanly (2 skipped, 0 failed); and with
the research patch actually applied plus the env var set (the real release
scenario), the full suite is green.

Git-Session-Id: cb3d
@greptile-apps

greptile-apps Bot commented Sep 7, 2026

Copy link
Copy Markdown

Greptile Summary

This PR prevents two pristine-default configuration guards from failing after the Research Edition release process intentionally patches the default.

  • Detects Research Edition test runs through the existing AW_RESEARCH_EDITION=true environment contract.
  • Skips only the two assertions invalidated by the release patch.
  • Preserves both guards in standard CI and ordinary developer test runs.

Confidence Score: 5/5

The PR appears safe to merge; the targeted skips align with the Research Edition release workflow while preserving standard CI coverage.

No actionable failures remain: the release environment uses the exact value checked by the tests, and normal test paths leave the variable unset so the guards continue to run.

Important Files Changed

Filename Overview
tests/test_config.py Adds a release-environment condition that skips two non-research default guards only during Research Edition builds.

Reviews (1): Last reviewed commit: "test(config): skip research-edition guar..." | Re-trigger Greptile

@ErikBjare
ErikBjare merged commit abd69a6 into ActivityWatch:master Sep 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants