@pennyfarthing/core 10.1.0 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -18
- package/package.json +3 -1
- package/packages/core/dist/cli/commands/doctor-file-layout.test.js.map +1 -1
- package/packages/core/dist/cli/commands/doctor-legacy.test.js +24 -0
- package/packages/core/dist/cli/commands/doctor-legacy.test.js.map +1 -1
- package/packages/core/dist/cli/commands/doctor.d.ts.map +1 -1
- package/packages/core/dist/cli/commands/doctor.js +101 -15
- package/packages/core/dist/cli/commands/doctor.js.map +1 -1
- package/packages/core/dist/cli/commands/e2e-fresh-install.test.js +1 -1
- package/packages/core/dist/cli/commands/e2e-fresh-install.test.js.map +1 -1
- package/packages/core/dist/cli/commands/e2e-upgrade.test.js +1 -1
- package/packages/core/dist/cli/commands/e2e-upgrade.test.js.map +1 -1
- package/packages/core/dist/cli/commands/hooks-consolidation.test.js +2 -2
- package/packages/core/dist/cli/commands/hooks-consolidation.test.js.map +1 -1
- package/packages/core/dist/cli/commands/init-consolidation.test.js.map +1 -1
- package/packages/core/dist/cli/commands/uninstall.d.ts.map +1 -1
- package/packages/core/dist/cli/commands/uninstall.js +24 -13
- package/packages/core/dist/cli/commands/uninstall.js.map +1 -1
- package/packages/core/dist/cli/commands/update-consolidation.test.js +0 -10
- package/packages/core/dist/cli/commands/update-consolidation.test.js.map +1 -1
- package/packages/core/dist/cli/commands/update.js.map +1 -1
- package/packages/core/dist/cli/ocean-profiles.test.js.map +1 -1
- package/packages/core/dist/cli/theme-maker.test.js +64 -115
- package/packages/core/dist/cli/theme-maker.test.js.map +1 -1
- package/packages/core/dist/index.d.ts +1 -1
- package/packages/core/dist/index.d.ts.map +1 -1
- package/packages/core/dist/index.js +2 -2
- package/packages/core/dist/index.js.map +1 -1
- package/packages/core/dist/plugins/plugin-discovery.d.ts +116 -0
- package/packages/core/dist/plugins/plugin-discovery.d.ts.map +1 -0
- package/packages/core/dist/plugins/plugin-discovery.js +165 -0
- package/packages/core/dist/plugins/plugin-discovery.js.map +1 -0
- package/packages/core/dist/plugins/plugin-discovery.test.d.ts +22 -0
- package/packages/core/dist/plugins/plugin-discovery.test.d.ts.map +1 -0
- package/packages/core/dist/plugins/plugin-discovery.test.js +498 -0
- package/packages/core/dist/plugins/plugin-discovery.test.js.map +1 -0
- package/packages/core/dist/scripts/generate-spider-report.js.map +1 -1
- package/packages/core/dist/workflow/context-watch.d.ts +80 -0
- package/packages/core/dist/workflow/context-watch.d.ts.map +1 -0
- package/packages/core/dist/workflow/context-watch.js +235 -0
- package/packages/core/dist/workflow/context-watch.js.map +1 -0
- package/packages/core/dist/workflow/context-watch.test.d.ts +1 -0
- package/packages/core/dist/workflow/context-watch.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/context-watch.test.js +746 -0
- package/packages/core/dist/workflow/context-watch.test.js.map +1 -0
- package/packages/core/dist/workflow/file-watch.d.ts +82 -0
- package/packages/core/dist/workflow/file-watch.d.ts.map +1 -0
- package/packages/core/dist/workflow/file-watch.js +198 -0
- package/packages/core/dist/workflow/file-watch.js.map +1 -0
- package/packages/core/dist/workflow/file-watch.test.d.ts +21 -0
- package/packages/core/dist/workflow/file-watch.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/file-watch.test.js +469 -0
- package/packages/core/dist/workflow/file-watch.test.js.map +1 -0
- package/packages/core/dist/workflow/observation-writer.d.ts +79 -0
- package/packages/core/dist/workflow/observation-writer.d.ts.map +1 -0
- package/packages/core/dist/workflow/observation-writer.js +97 -0
- package/packages/core/dist/workflow/observation-writer.js.map +1 -0
- package/packages/core/dist/workflow/observation-writer.test.d.ts +18 -0
- package/packages/core/dist/workflow/observation-writer.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/observation-writer.test.js +424 -0
- package/packages/core/dist/workflow/observation-writer.test.js.map +1 -0
- package/packages/core/dist/workflow/story-workflow-routing.test.js +4 -2
- package/packages/core/dist/workflow/story-workflow-routing.test.js.map +1 -1
- package/packages/core/dist/workflow/tandem-lifecycle.d.ts +117 -0
- package/packages/core/dist/workflow/tandem-lifecycle.d.ts.map +1 -0
- package/packages/core/dist/workflow/tandem-lifecycle.js +186 -0
- package/packages/core/dist/workflow/tandem-lifecycle.js.map +1 -0
- package/packages/core/dist/workflow/tandem-lifecycle.test.d.ts +16 -0
- package/packages/core/dist/workflow/tandem-lifecycle.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/tandem-lifecycle.test.js +531 -0
- package/packages/core/dist/workflow/tandem-lifecycle.test.js.map +1 -0
- package/packages/core/dist/workflow/tool-watch.d.ts +68 -0
- package/packages/core/dist/workflow/tool-watch.d.ts.map +1 -0
- package/packages/core/dist/workflow/tool-watch.js +166 -0
- package/packages/core/dist/workflow/tool-watch.js.map +1 -0
- package/packages/core/dist/workflow/tool-watch.test.d.ts +18 -0
- package/packages/core/dist/workflow/tool-watch.test.d.ts.map +1 -0
- package/packages/core/dist/workflow/tool-watch.test.js +718 -0
- package/packages/core/dist/workflow/tool-watch.test.js.map +1 -0
- package/packages/core/dist/workflow/workflow-migration.test.js +8 -4
- package/packages/core/dist/workflow/workflow-migration.test.js.map +1 -1
- package/packages/core/dist/workflow/workflow-schema.d.ts +7 -0
- package/packages/core/dist/workflow/workflow-schema.d.ts.map +1 -1
- package/packages/core/dist/workflow/workflow-schema.js +44 -0
- package/packages/core/dist/workflow/workflow-schema.js.map +1 -1
- package/packages/core/dist/workflow/workflow-schema.test.d.ts.map +1 -1
- package/packages/core/dist/workflow/workflow-schema.test.js +192 -0
- package/packages/core/dist/workflow/workflow-schema.test.js.map +1 -1
- package/pennyfarthing-dist/agents/handoff.md +18 -3
- package/pennyfarthing-dist/agents/sm-finish.md +1 -1
- package/pennyfarthing-dist/agents/sm-handoff.md +27 -4
- package/pennyfarthing-dist/agents/sm.md +11 -5
- package/pennyfarthing-dist/agents/tandem-backseat.md +119 -0
- package/pennyfarthing-dist/commands/setup.md +4 -0
- package/pennyfarthing-dist/guides/agent-behavior.md +62 -6
- package/pennyfarthing-dist/guides/bikelane.md +3 -2
- package/pennyfarthing-dist/guides/scale-levels.md +4 -6
- package/pennyfarthing-dist/guides/tandem-protocol.md +158 -0
- package/pennyfarthing-dist/personas/themes/discworld.yaml +1 -1
- package/pennyfarthing-dist/personas/themes/fifth-element.yaml +295 -0
- package/pennyfarthing-dist/scripts/README.md +1 -1
- package/pennyfarthing-dist/scripts/hooks/bell-mode-hook.sh +131 -54
- package/pennyfarthing-dist/scripts/hooks/post-merge.sh +20 -10
- package/pennyfarthing-dist/scripts/misc/statusline.sh +50 -8
- package/pennyfarthing-dist/scripts/workflow/README.md +2 -2
- package/pennyfarthing-dist/scripts/workflow/finish-story.sh +10 -189
- package/pennyfarthing-dist/skills/skill-registry.schema.json +8 -0
- package/pennyfarthing-dist/skills/skill-registry.yaml +1 -1
- package/pennyfarthing-dist/skills/sprint/skill.md +25 -2
- package/pennyfarthing-dist/skills/workflow/skill.md +24 -1
- package/pennyfarthing-dist/workflows/architecture/workflow.yaml +65 -0
- package/pennyfarthing-dist/workflows/bdd-tandem.yaml +70 -0
- package/pennyfarthing-dist/workflows/tdd-tandem.yaml +61 -0
- package/pennyfarthing_scripts/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/bellmode_hook.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/config.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/hooks.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/jira_bidirectional_sync.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/jira_epic_creation.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/jira_sync.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/jira_sync_story.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/output.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/patch_mode.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/schema_validation_hook.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/workflow.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/bellmode_hook.py +202 -47
- package/pennyfarthing_scripts/brownfield/__init__.py +6 -6
- package/pennyfarthing_scripts/brownfield/__main__.py +1 -0
- package/pennyfarthing_scripts/brownfield/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/brownfield/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/brownfield/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/brownfield/__pycache__/discover.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/brownfield/cli.py +0 -1
- package/pennyfarthing_scripts/brownfield/discover.py +1 -2
- package/pennyfarthing_scripts/cli.py +11 -6
- package/pennyfarthing_scripts/codemarkers/__init__.py +5 -1
- package/pennyfarthing_scripts/codemarkers/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/codemarkers/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/codemarkers/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/codemarkers/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/codemarkers/__pycache__/formatters.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/codemarkers/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/codemarkers/analyze.py +177 -2
- package/pennyfarthing_scripts/codemarkers/cli.py +50 -0
- package/pennyfarthing_scripts/codemarkers/formatters.py +0 -1
- package/pennyfarthing_scripts/codemarkers/models.py +15 -0
- package/pennyfarthing_scripts/common/__init__.py +8 -9
- package/pennyfarthing_scripts/common/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/common/__pycache__/config.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/common/__pycache__/output.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/common/__pycache__/themes.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/common/config.py +1 -1
- package/pennyfarthing_scripts/complexity/__init__.py +1 -1
- package/pennyfarthing_scripts/complexity/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/complexity/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/complexity/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/complexity/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/complexity/__pycache__/formatters.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/complexity/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/complexity/analyze.py +1 -1
- package/pennyfarthing_scripts/complexity/cli.py +5 -1
- package/pennyfarthing_scripts/complexity/formatters.py +1 -1
- package/pennyfarthing_scripts/context.py +14 -15
- package/pennyfarthing_scripts/deadcode/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/deadcode/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/deadcode/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/deadcode/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/deadcode/__pycache__/formatters.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/deadcode/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/deadcode/analyze.py +3 -4
- package/pennyfarthing_scripts/deadcode/cli.py +2 -2
- package/pennyfarthing_scripts/dependencies/__init__.py +2 -2
- package/pennyfarthing_scripts/dependencies/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/dependencies/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/dependencies/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/dependencies/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/dependencies/__pycache__/formatters.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/dependencies/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/dependencies/analyze.py +1 -1
- package/pennyfarthing_scripts/dependencies/cli.py +8 -4
- package/pennyfarthing_scripts/dependencies/formatters.py +1 -1
- package/pennyfarthing_scripts/git/__init__.py +5 -5
- package/pennyfarthing_scripts/git/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/git/__pycache__/create_branches.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/git/__pycache__/status_all.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/git/create_branches.py +3 -2
- package/pennyfarthing_scripts/git/status_all.py +1 -1
- package/pennyfarthing_scripts/healthscore/__init__.py +2 -2
- package/pennyfarthing_scripts/healthscore/__main__.py +8 -0
- package/pennyfarthing_scripts/healthscore/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/healthscore/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/healthscore/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/healthscore/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/healthscore/__pycache__/formatters.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/healthscore/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/healthscore/analyze.py +451 -21
- package/pennyfarthing_scripts/healthscore/cli.py +5 -1
- package/pennyfarthing_scripts/healthscore/models.py +0 -1
- package/pennyfarthing_scripts/hooks.py +8 -11
- package/pennyfarthing_scripts/hotspots/__init__.py +6 -6
- package/pennyfarthing_scripts/hotspots/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hotspots/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hotspots/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hotspots/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hotspots/__pycache__/formatters.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hotspots/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/hotspots/analyze.py +128 -14
- package/pennyfarthing_scripts/hotspots/cli.py +2 -2
- package/pennyfarthing_scripts/hotspots/models.py +0 -1
- package/pennyfarthing_scripts/jira/__init__.py +15 -17
- package/pennyfarthing_scripts/jira/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/bidirectional.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/claim.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/client.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/create.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/epic.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/operations.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/reconcile.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/story.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/sync.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/bidirectional.py +2 -3
- package/pennyfarthing_scripts/jira/claim.py +21 -0
- package/pennyfarthing_scripts/jira/cli.py +2 -2
- package/pennyfarthing_scripts/jira/client.py +4 -4
- package/pennyfarthing_scripts/jira/create.py +45 -1
- package/pennyfarthing_scripts/jira/epic.py +3 -2
- package/pennyfarthing_scripts/jira/reconcile.py +0 -1
- package/pennyfarthing_scripts/jira/story.py +2 -0
- package/pennyfarthing_scripts/jira/sync.py +1 -1
- package/pennyfarthing_scripts/migration/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/__pycache__/session.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/__pycache__/skill.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/__pycache__/step.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/__pycache__/validate.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/skill.py +0 -1
- package/pennyfarthing_scripts/migration/step.py +0 -1
- package/pennyfarthing_scripts/migration/validate.py +8 -5
- package/pennyfarthing_scripts/patch_mode.py +2 -2
- package/pennyfarthing_scripts/preflight/__init__.py +1 -1
- package/pennyfarthing_scripts/preflight/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/preflight/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/preflight/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/preflight/__pycache__/finish.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/preflight/finish.py +0 -1
- package/pennyfarthing_scripts/pretooluse_hook.py +6 -7
- package/pennyfarthing_scripts/prime/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/loader.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/persona.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/session.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/tiers.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/workflow.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/cli.py +5 -1
- package/pennyfarthing_scripts/prime/loader.py +2 -3
- package/pennyfarthing_scripts/prime/persona.py +2 -1
- package/pennyfarthing_scripts/prime/tiers.py +4 -4
- package/pennyfarthing_scripts/schema_validation_hook.py +2 -3
- package/pennyfarthing_scripts/sprint/__init__.py +10 -12
- package/pennyfarthing_scripts/sprint/__main__.py +2 -2
- package/pennyfarthing_scripts/sprint/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/archive.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/archive_epic.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/epic_add.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/import_epic.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/loader.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/status.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/story_add.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/story_finish.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/story_update.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/validate_cmd.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/validator.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/work.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/__pycache__/yaml_io.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/sprint/archive.py +0 -1
- package/pennyfarthing_scripts/sprint/archive_epic.py +1 -4
- package/pennyfarthing_scripts/sprint/cli.py +34 -28
- package/pennyfarthing_scripts/sprint/epic_add.py +8 -1
- package/pennyfarthing_scripts/sprint/import_epic.py +42 -18
- package/pennyfarthing_scripts/sprint/loader.py +6 -0
- package/pennyfarthing_scripts/sprint/status.py +1 -2
- package/pennyfarthing_scripts/sprint/story_add.py +2 -2
- package/pennyfarthing_scripts/sprint/story_finish.py +3 -5
- package/pennyfarthing_scripts/sprint/story_update.py +11 -3
- package/pennyfarthing_scripts/sprint/validate_cmd.py +0 -1
- package/pennyfarthing_scripts/sprint/validator.py +120 -6
- package/pennyfarthing_scripts/sprint/work.py +1 -4
- package/pennyfarthing_scripts/sprint/yaml_io.py +10 -2
- package/pennyfarthing_scripts/story/__init__.py +14 -16
- package/pennyfarthing_scripts/story/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/story/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/story/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/story/__pycache__/create.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/story/__pycache__/size.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/story/__pycache__/template.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/story/size.py +0 -1
- package/pennyfarthing_scripts/story/template.py +0 -1
- package/pennyfarthing_scripts/swebench.py +1 -2
- package/pennyfarthing_scripts/tests/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/conftest.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_brownfield.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_cli_modules.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_codemarkers.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_common.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_git_utils.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_healthscore.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_jira_package.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_package_structure.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_patch_mode.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_prime.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_sprint_package.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_sprint_validator.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_story_add.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_story_package.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_story_update.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_tiers.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_token_counting.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_validate_cmd.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_workflow_check.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_yaml_io.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing_scripts/tests/conftest.py +1 -2
- package/pennyfarthing_scripts/tests/test_brownfield.py +10 -13
- package/pennyfarthing_scripts/tests/test_cli_modules.py +0 -4
- package/pennyfarthing_scripts/tests/test_codemarkers.py +13 -8
- package/pennyfarthing_scripts/tests/test_common.py +9 -4
- package/pennyfarthing_scripts/tests/test_epic_shard_validation.py +699 -0
- package/pennyfarthing_scripts/tests/test_git_utils.py +10 -13
- package/pennyfarthing_scripts/tests/test_healthscore.py +17 -25
- package/pennyfarthing_scripts/tests/test_jira_package.py +0 -3
- package/pennyfarthing_scripts/tests/test_package_structure.py +3 -16
- package/pennyfarthing_scripts/tests/test_patch_mode.py +7 -11
- package/pennyfarthing_scripts/tests/test_prime.py +39 -21
- package/pennyfarthing_scripts/tests/test_sprint_package.py +3 -8
- package/pennyfarthing_scripts/tests/test_sprint_validator.py +53 -5
- package/pennyfarthing_scripts/tests/test_story_add.py +3 -7
- package/pennyfarthing_scripts/tests/test_story_package.py +0 -3
- package/pennyfarthing_scripts/tests/test_story_update.py +5 -10
- package/pennyfarthing_scripts/tests/test_tiers.py +18 -17
- package/pennyfarthing_scripts/tests/test_token_counting.py +19 -13
- package/pennyfarthing_scripts/tests/test_validate_cmd.py +2 -7
- package/pennyfarthing_scripts/tests/test_workflow_check.py +0 -2
- package/pennyfarthing_scripts/tests/test_yaml_io.py +0 -3
- package/pennyfarthing_scripts/theme/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/theme/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/theme/cli.py +3 -2
- package/pennyfarthing_scripts/validate/__init__.py +21 -0
- package/pennyfarthing_scripts/validate/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__init__.py +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/agent.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/schema.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/skill_command.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/sprint.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/__pycache__/workflow.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/validate/adapters/agent.py +239 -0
- package/pennyfarthing_scripts/validate/adapters/schema.py +30 -0
- package/pennyfarthing_scripts/validate/adapters/skill_command.py +292 -0
- package/pennyfarthing_scripts/validate/adapters/sprint.py +69 -0
- package/pennyfarthing_scripts/validate/adapters/workflow.py +320 -0
- package/pennyfarthing_scripts/validate/cli.py +141 -0
- package/pennyfarthing_scripts/welcome_hook.py +2 -3
- package/pennyfarthing_scripts/workflow.py +3 -3
- package/scripts/README.md +3 -15
- package/pennyfarthing-dist/commands/benchmark-control.md +0 -69
- package/pennyfarthing-dist/commands/benchmark.md +0 -485
- package/pennyfarthing-dist/commands/job-fair.md +0 -102
- package/pennyfarthing-dist/commands/solo.md +0 -447
- package/pennyfarthing-dist/guides/benchmarks.md +0 -62
- package/pennyfarthing-dist/scripts/hooks/__pycache__/question_reflector_check.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/scripts/test/ensure-swebench-data.sh +0 -59
- package/pennyfarthing-dist/scripts/test/ground-truth-judge.py +0 -220
- package/pennyfarthing-dist/scripts/test/swebench-judge.py +0 -374
- package/pennyfarthing-dist/scripts/test/test-cache.sh +0 -165
- package/pennyfarthing-dist/scripts/test/test-setup.sh +0 -337
- package/pennyfarthing-dist/scripts/theme/compute-theme-tiers.sh +0 -13
- package/pennyfarthing-dist/scripts/theme/compute_theme_tiers.py +0 -402
- package/pennyfarthing-dist/scripts/theme/update-theme-tiers.sh +0 -97
- package/pennyfarthing-dist/skills/finalize-run/SKILL.md +0 -261
- package/pennyfarthing-dist/skills/judge/SKILL.md +0 -644
- package/pennyfarthing-dist/skills/persona-benchmark/SKILL.md +0 -187
- package/pennyfarthing-dist/workflows/dev-story/checklist.md +0 -80
- package/pennyfarthing-dist/workflows/dev-story/instructions.xml +0 -410
- package/pennyfarthing-dist/workflows/dev-story/workflow.yaml +0 -50
- package/pennyfarthing-dist/workflows/quick-spec/steps/step-01-understand.md +0 -201
- package/pennyfarthing-dist/workflows/quick-spec/steps/step-02-investigate.md +0 -156
- package/pennyfarthing-dist/workflows/quick-spec/steps/step-03-generate.md +0 -140
- package/pennyfarthing-dist/workflows/quick-spec/steps/step-04-review.md +0 -203
- package/pennyfarthing-dist/workflows/quick-spec/tech-spec-template.md +0 -74
- package/pennyfarthing-dist/workflows/quick-spec/workflow.yaml +0 -27
- package/pennyfarthing_scripts/__pycache__/__init__.cpython-311.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/jira.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/pretooluse_hook.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/sprint.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/__pycache__/workflow.cpython-311.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/compat.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/mappings.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/jira/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/migration/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/prime/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing_scripts/tests/__pycache__/test_workflow_cli.cpython-314-pytest-9.0.2.pyc +0 -0
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# test-cache.sh - Read/write test result cache in session files
|
|
3
|
-
#
|
|
4
|
-
# Usage:
|
|
5
|
-
# source test-cache.sh
|
|
6
|
-
#
|
|
7
|
-
# # Check if valid cache exists (returns 0 if valid, 1 if stale/missing)
|
|
8
|
-
# if test_cache_valid "$SESSION_FILE"; then
|
|
9
|
-
# RESULT=$(test_cache_get "$SESSION_FILE" "result")
|
|
10
|
-
# echo "Using cached result: $RESULT"
|
|
11
|
-
# fi
|
|
12
|
-
#
|
|
13
|
-
# # Write cache after running tests
|
|
14
|
-
# test_cache_write "$SESSION_FILE" "GREEN" 42 0 1 "12s"
|
|
15
|
-
|
|
16
|
-
set -euo pipefail
|
|
17
|
-
|
|
18
|
-
# Cache validity window (5 minutes)
|
|
19
|
-
CACHE_MAX_AGE_MINUTES=5
|
|
20
|
-
|
|
21
|
-
# Check if test cache exists and is valid (same SHA, < 5 min old)
|
|
22
|
-
# Returns: 0 if valid, 1 if invalid/missing
|
|
23
|
-
test_cache_valid() {
|
|
24
|
-
local session_file="$1"
|
|
25
|
-
|
|
26
|
-
if [[ ! -f "$session_file" ]]; then
|
|
27
|
-
return 1
|
|
28
|
-
fi
|
|
29
|
-
|
|
30
|
-
if ! grep -q "^## Test Cache" "$session_file" 2>/dev/null; then
|
|
31
|
-
return 1
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
local current_sha
|
|
35
|
-
current_sha=$(git rev-parse HEAD 2>/dev/null || echo "unknown")
|
|
36
|
-
|
|
37
|
-
local cache_sha
|
|
38
|
-
cache_sha=$(grep "| Git SHA |" "$session_file" 2>/dev/null | sed 's/.*| \([^ ]*\) |.*/\1/' | xargs)
|
|
39
|
-
|
|
40
|
-
if [[ "$cache_sha" != "$current_sha" ]]; then
|
|
41
|
-
return 1
|
|
42
|
-
fi
|
|
43
|
-
|
|
44
|
-
local cache_time
|
|
45
|
-
cache_time=$(grep "| Last Run |" "$session_file" 2>/dev/null | sed 's/.*| \([^ ]*\) |.*/\1/' | xargs)
|
|
46
|
-
|
|
47
|
-
local cache_epoch now_epoch age_minutes
|
|
48
|
-
# macOS date
|
|
49
|
-
cache_epoch=$(date -j -f "%Y-%m-%dT%H:%M:%SZ" "$cache_time" +%s 2>/dev/null || \
|
|
50
|
-
date -d "$cache_time" +%s 2>/dev/null || echo 0)
|
|
51
|
-
now_epoch=$(date +%s)
|
|
52
|
-
age_minutes=$(( (now_epoch - cache_epoch) / 60 ))
|
|
53
|
-
|
|
54
|
-
if [[ $age_minutes -ge $CACHE_MAX_AGE_MINUTES ]]; then
|
|
55
|
-
return 1
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
return 0
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
# Get a field from the test cache
|
|
62
|
-
# Usage: test_cache_get "$SESSION_FILE" "result|pass|fail|skip|duration|sha|time"
|
|
63
|
-
test_cache_get() {
|
|
64
|
-
local session_file="$1"
|
|
65
|
-
local field="$2"
|
|
66
|
-
|
|
67
|
-
case "$field" in
|
|
68
|
-
result) grep "| Result |" "$session_file" 2>/dev/null | sed 's/.*| \([^ ]*\) |.*/\1/' | xargs ;;
|
|
69
|
-
pass) grep "| Pass |" "$session_file" 2>/dev/null | sed 's/.*| \([^ ]*\) |.*/\1/' | xargs ;;
|
|
70
|
-
fail) grep "| Fail |" "$session_file" 2>/dev/null | sed 's/.*| \([^ ]*\) |.*/\1/' | xargs ;;
|
|
71
|
-
skip) grep "| Skip |" "$session_file" 2>/dev/null | sed 's/.*| \([^ ]*\) |.*/\1/' | xargs ;;
|
|
72
|
-
duration) grep "| Duration |" "$session_file" 2>/dev/null | sed 's/.*| \([^ ]*\) |.*/\1/' | xargs ;;
|
|
73
|
-
sha) grep "| Git SHA |" "$session_file" 2>/dev/null | sed 's/.*| \([^ ]*\) |.*/\1/' | xargs ;;
|
|
74
|
-
time) grep "| Last Run |" "$session_file" 2>/dev/null | sed 's/.*| \([^ ]*\) |.*/\1/' | xargs ;;
|
|
75
|
-
*) echo "Unknown field: $field" >&2; return 1 ;;
|
|
76
|
-
esac
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
# Write test cache to session file
|
|
80
|
-
# Usage: test_cache_write "$SESSION_FILE" "GREEN" 42 0 1 "12s"
|
|
81
|
-
test_cache_write() {
|
|
82
|
-
local session_file="$1"
|
|
83
|
-
local result="$2" # GREEN, RED, YELLOW
|
|
84
|
-
local pass="$3" # pass count
|
|
85
|
-
local fail="$4" # fail count
|
|
86
|
-
local skip="$5" # skip count
|
|
87
|
-
local duration="$6" # e.g., "12s"
|
|
88
|
-
|
|
89
|
-
local git_sha timestamp
|
|
90
|
-
git_sha=$(git rev-parse HEAD 2>/dev/null || echo "unknown")
|
|
91
|
-
timestamp=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
92
|
-
|
|
93
|
-
local cache_section="## Test Cache
|
|
94
|
-
|
|
95
|
-
| Field | Value |
|
|
96
|
-
|-------|-------|
|
|
97
|
-
| Last Run | $timestamp |
|
|
98
|
-
| Git SHA | $git_sha |
|
|
99
|
-
| Result | $result |
|
|
100
|
-
| Pass | $pass |
|
|
101
|
-
| Fail | $fail |
|
|
102
|
-
| Skip | $skip |
|
|
103
|
-
| Duration | $duration |"
|
|
104
|
-
|
|
105
|
-
if [[ ! -f "$session_file" ]]; then
|
|
106
|
-
echo "Session file not found: $session_file" >&2
|
|
107
|
-
return 1
|
|
108
|
-
fi
|
|
109
|
-
|
|
110
|
-
# Check if Test Cache section exists
|
|
111
|
-
if grep -q "^## Test Cache" "$session_file" 2>/dev/null; then
|
|
112
|
-
# Replace existing section - find start and end, replace content
|
|
113
|
-
local temp_file
|
|
114
|
-
temp_file=$(mktemp)
|
|
115
|
-
|
|
116
|
-
awk -v new_section="$cache_section" '
|
|
117
|
-
/^## Test Cache/ {
|
|
118
|
-
in_section = 1
|
|
119
|
-
print new_section
|
|
120
|
-
next
|
|
121
|
-
}
|
|
122
|
-
/^## / && in_section {
|
|
123
|
-
in_section = 0
|
|
124
|
-
}
|
|
125
|
-
!in_section { print }
|
|
126
|
-
' "$session_file" > "$temp_file"
|
|
127
|
-
|
|
128
|
-
mv "$temp_file" "$session_file"
|
|
129
|
-
else
|
|
130
|
-
# Append before "## Workflow Tracking" if present, else at end
|
|
131
|
-
if grep -q "^## Workflow Tracking" "$session_file" 2>/dev/null; then
|
|
132
|
-
local temp_file
|
|
133
|
-
temp_file=$(mktemp)
|
|
134
|
-
|
|
135
|
-
awk -v new_section="$cache_section" '
|
|
136
|
-
/^## Workflow Tracking/ {
|
|
137
|
-
print new_section
|
|
138
|
-
print ""
|
|
139
|
-
}
|
|
140
|
-
{ print }
|
|
141
|
-
' "$session_file" > "$temp_file"
|
|
142
|
-
|
|
143
|
-
mv "$temp_file" "$session_file"
|
|
144
|
-
else
|
|
145
|
-
echo "" >> "$session_file"
|
|
146
|
-
echo "$cache_section" >> "$session_file"
|
|
147
|
-
fi
|
|
148
|
-
fi
|
|
149
|
-
|
|
150
|
-
echo "Test cache written: $result ($pass passed, $fail failed, $skip skipped)"
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
# Print cache status for debugging
|
|
154
|
-
test_cache_status() {
|
|
155
|
-
local session_file="$1"
|
|
156
|
-
|
|
157
|
-
if test_cache_valid "$session_file"; then
|
|
158
|
-
echo "Cache: VALID"
|
|
159
|
-
echo " Result: $(test_cache_get "$session_file" "result")"
|
|
160
|
-
echo " SHA: $(test_cache_get "$session_file" "sha")"
|
|
161
|
-
echo " Time: $(test_cache_get "$session_file" "time")"
|
|
162
|
-
else
|
|
163
|
-
echo "Cache: INVALID or MISSING"
|
|
164
|
-
fi
|
|
165
|
-
}
|
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env zsh
|
|
2
|
-
# Pennyfarthing Test Setup Utilities
|
|
3
|
-
# Config-driven test utilities that work with any project structure
|
|
4
|
-
#
|
|
5
|
-
# Usage: source scripts/test/test-setup.sh
|
|
6
|
-
#
|
|
7
|
-
# Configuration is read from .pennyfarthing/repos.yaml
|
|
8
|
-
# See repos.yaml for schema documentation
|
|
9
|
-
#
|
|
10
|
-
# Functions:
|
|
11
|
-
# generate_run_id - Create timestamp-based unique run ID
|
|
12
|
-
# get_log_path TYPE RUN_ID - Return log file path for a test type
|
|
13
|
-
# ensure_test_containers - Start test containers if configured
|
|
14
|
-
# setup_repo_test_env REPO - Export test env vars for a repo
|
|
15
|
-
# check_skip_violations REPO - Check for forbidden skip patterns
|
|
16
|
-
# show_skip_violations REPO - Display skip violation details
|
|
17
|
-
# cleanup_test_logs - Remove old test/lint log files
|
|
18
|
-
|
|
19
|
-
# Don't exit on error - we want to handle errors gracefully
|
|
20
|
-
set +e
|
|
21
|
-
|
|
22
|
-
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
23
|
-
PROJECT_ROOT="${PROJECT_ROOT:-$(cd "$SCRIPT_DIR/../.." && pwd)}"
|
|
24
|
-
|
|
25
|
-
# Source repo-utils for config access
|
|
26
|
-
source "$CLAUDE_PROJECT_DIR/scripts/repo-utils.sh" 2>/dev/null || {
|
|
27
|
-
echo "Warning: repo-utils.sh not found, using defaults" >&2
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
# ============================================================================
|
|
31
|
-
# Run ID and Logging
|
|
32
|
-
# ============================================================================
|
|
33
|
-
|
|
34
|
-
# Generate a unique run ID based on timestamp
|
|
35
|
-
# Usage: RUN_ID=$(generate_run_id)
|
|
36
|
-
generate_run_id() {
|
|
37
|
-
date +%Y%m%d-%H%M%S
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
# Get log file path for a given type
|
|
41
|
-
# Usage: LOG_PATH=$(get_log_path "test-myrepo" "$RUN_ID")
|
|
42
|
-
# Types: test-{repo}, lint-{repo}, or any custom prefix
|
|
43
|
-
get_log_path() {
|
|
44
|
-
local log_type="$1"
|
|
45
|
-
local run_id="${2:-$(generate_run_id)}"
|
|
46
|
-
|
|
47
|
-
# Use configured log dir or default
|
|
48
|
-
local log_dir
|
|
49
|
-
if declare -f get_test_log_dir &>/dev/null; then
|
|
50
|
-
log_dir=$(get_test_log_dir)
|
|
51
|
-
else
|
|
52
|
-
log_dir="$CLAUDE_PROJECT_DIR/.session"
|
|
53
|
-
fi
|
|
54
|
-
|
|
55
|
-
echo "${log_dir}/${log_type}-results-${run_id}.log"
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
# ============================================================================
|
|
59
|
-
# Container Management
|
|
60
|
-
# ============================================================================
|
|
61
|
-
|
|
62
|
-
# Check if test containers are running, start if configured
|
|
63
|
-
# Returns: 0 if containers ready (or none needed), 1 if failed to start
|
|
64
|
-
ensure_test_containers() {
|
|
65
|
-
# Get container command from config
|
|
66
|
-
local container_cmd
|
|
67
|
-
if declare -f get_container_command &>/dev/null; then
|
|
68
|
-
container_cmd=$(get_container_command)
|
|
69
|
-
fi
|
|
70
|
-
|
|
71
|
-
# If no container command configured, nothing to do
|
|
72
|
-
if [[ -z "$container_cmd" ]]; then
|
|
73
|
-
return 0
|
|
74
|
-
fi
|
|
75
|
-
|
|
76
|
-
echo "Starting test containers via: $container_cmd"
|
|
77
|
-
eval "$container_cmd"
|
|
78
|
-
return $?
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
# ============================================================================
|
|
82
|
-
# Environment Setup
|
|
83
|
-
# ============================================================================
|
|
84
|
-
|
|
85
|
-
# Export test environment variables for a specific repo
|
|
86
|
-
# Usage: setup_repo_test_env "Pennyfarthing-api"
|
|
87
|
-
setup_repo_test_env() {
|
|
88
|
-
local repo="$1"
|
|
89
|
-
|
|
90
|
-
if declare -f get_test_env &>/dev/null; then
|
|
91
|
-
local env_exports
|
|
92
|
-
env_exports=$(get_test_env "$repo")
|
|
93
|
-
if [[ -n "$env_exports" ]]; then
|
|
94
|
-
eval "$env_exports"
|
|
95
|
-
fi
|
|
96
|
-
fi
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
# Export test environment for all repos
|
|
100
|
-
# Usage: setup_all_test_env
|
|
101
|
-
setup_all_test_env() {
|
|
102
|
-
if ! declare -f get_repos &>/dev/null; then
|
|
103
|
-
return 0
|
|
104
|
-
fi
|
|
105
|
-
|
|
106
|
-
for repo in $(get_repos); do
|
|
107
|
-
setup_repo_test_env "$repo"
|
|
108
|
-
done
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
# ============================================================================
|
|
112
|
-
# Skip Violation Checks
|
|
113
|
-
# ============================================================================
|
|
114
|
-
|
|
115
|
-
# Check for forbidden skip patterns in a repo's test files
|
|
116
|
-
# Usage: VIOLATIONS=$(check_skip_violations "Pennyfarthing-api")
|
|
117
|
-
# Returns: count of violations found
|
|
118
|
-
check_skip_violations() {
|
|
119
|
-
local repo="$1"
|
|
120
|
-
local count=0
|
|
121
|
-
|
|
122
|
-
# Get repo info
|
|
123
|
-
local repo_path language
|
|
124
|
-
if declare -f get_repo_full_path &>/dev/null; then
|
|
125
|
-
repo_path=$(get_repo_full_path "$repo")
|
|
126
|
-
language=$(get_repo_language "$repo")
|
|
127
|
-
else
|
|
128
|
-
repo_path="$CLAUDE_PROJECT_DIR/$repo"
|
|
129
|
-
language="unknown"
|
|
130
|
-
fi
|
|
131
|
-
|
|
132
|
-
if [[ ! -d "$repo_path" ]]; then
|
|
133
|
-
echo "0"
|
|
134
|
-
return 0
|
|
135
|
-
fi
|
|
136
|
-
|
|
137
|
-
# Get patterns for this language
|
|
138
|
-
local skip_patterns skip_exceptions file_pattern
|
|
139
|
-
if declare -f get_skip_patterns &>/dev/null; then
|
|
140
|
-
skip_patterns=$(get_skip_patterns "$language")
|
|
141
|
-
skip_exceptions=$(get_skip_exceptions "$language")
|
|
142
|
-
file_pattern=$(get_test_file_pattern "$language")
|
|
143
|
-
else
|
|
144
|
-
# Fallback defaults
|
|
145
|
-
case "$language" in
|
|
146
|
-
go)
|
|
147
|
-
skip_patterns='t\.Skip'
|
|
148
|
-
skip_exceptions='LocalStack|not available'
|
|
149
|
-
file_pattern='*_test.go'
|
|
150
|
-
;;
|
|
151
|
-
typescript|javascript)
|
|
152
|
-
skip_patterns='it\.skip|describe\.skip|test\.skip'
|
|
153
|
-
skip_exceptions=''
|
|
154
|
-
file_pattern='*.test.*'
|
|
155
|
-
;;
|
|
156
|
-
*)
|
|
157
|
-
echo "0"
|
|
158
|
-
return 0
|
|
159
|
-
;;
|
|
160
|
-
esac
|
|
161
|
-
fi
|
|
162
|
-
|
|
163
|
-
if [[ -z "$skip_patterns" ]]; then
|
|
164
|
-
echo "0"
|
|
165
|
-
return 0
|
|
166
|
-
fi
|
|
167
|
-
|
|
168
|
-
# Search for violations
|
|
169
|
-
local grep_result
|
|
170
|
-
grep_result=$(grep -r -E "$skip_patterns" "$repo_path" --include="$file_pattern" 2>/dev/null || true)
|
|
171
|
-
|
|
172
|
-
# Filter out exceptions
|
|
173
|
-
if [[ -n "$skip_exceptions" && -n "$grep_result" ]]; then
|
|
174
|
-
grep_result=$(echo "$grep_result" | grep -v -E "$skip_exceptions" || true)
|
|
175
|
-
fi
|
|
176
|
-
|
|
177
|
-
# Count remaining violations
|
|
178
|
-
if [[ -n "$grep_result" ]]; then
|
|
179
|
-
count=$(echo "$grep_result" | wc -l | tr -d ' ')
|
|
180
|
-
fi
|
|
181
|
-
|
|
182
|
-
echo "$count"
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
# Show skip violations with file locations
|
|
186
|
-
# Usage: show_skip_violations "Pennyfarthing-api" [max_lines]
|
|
187
|
-
show_skip_violations() {
|
|
188
|
-
local repo="$1"
|
|
189
|
-
local max_lines="${2:-10}"
|
|
190
|
-
|
|
191
|
-
# Get repo info
|
|
192
|
-
local repo_path language
|
|
193
|
-
if declare -f get_repo_full_path &>/dev/null; then
|
|
194
|
-
repo_path=$(get_repo_full_path "$repo")
|
|
195
|
-
language=$(get_repo_language "$repo")
|
|
196
|
-
else
|
|
197
|
-
repo_path="$CLAUDE_PROJECT_DIR/$repo"
|
|
198
|
-
language="unknown"
|
|
199
|
-
fi
|
|
200
|
-
|
|
201
|
-
if [[ ! -d "$repo_path" ]]; then
|
|
202
|
-
return 0
|
|
203
|
-
fi
|
|
204
|
-
|
|
205
|
-
# Get patterns for this language
|
|
206
|
-
local skip_patterns skip_exceptions file_pattern
|
|
207
|
-
if declare -f get_skip_patterns &>/dev/null; then
|
|
208
|
-
skip_patterns=$(get_skip_patterns "$language")
|
|
209
|
-
skip_exceptions=$(get_skip_exceptions "$language")
|
|
210
|
-
file_pattern=$(get_test_file_pattern "$language")
|
|
211
|
-
else
|
|
212
|
-
return 0
|
|
213
|
-
fi
|
|
214
|
-
|
|
215
|
-
if [[ -z "$skip_patterns" ]]; then
|
|
216
|
-
return 0
|
|
217
|
-
fi
|
|
218
|
-
|
|
219
|
-
# Search and display
|
|
220
|
-
local grep_result
|
|
221
|
-
grep_result=$(grep -r -E "$skip_patterns" "$repo_path" --include="$file_pattern" 2>/dev/null || true)
|
|
222
|
-
|
|
223
|
-
if [[ -n "$skip_exceptions" && -n "$grep_result" ]]; then
|
|
224
|
-
grep_result=$(echo "$grep_result" | grep -v -E "$skip_exceptions" || true)
|
|
225
|
-
fi
|
|
226
|
-
|
|
227
|
-
if [[ -n "$grep_result" ]]; then
|
|
228
|
-
echo "$grep_result" | head -"$max_lines"
|
|
229
|
-
fi
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
# Check all repos for skip violations
|
|
233
|
-
# Usage: TOTAL=$(check_all_skip_violations)
|
|
234
|
-
check_all_skip_violations() {
|
|
235
|
-
local total=0
|
|
236
|
-
|
|
237
|
-
if ! declare -f get_repos &>/dev/null; then
|
|
238
|
-
echo "0"
|
|
239
|
-
return 0
|
|
240
|
-
fi
|
|
241
|
-
|
|
242
|
-
for repo in $(get_repos); do
|
|
243
|
-
local count
|
|
244
|
-
count=$(check_skip_violations "$repo")
|
|
245
|
-
total=$((total + count))
|
|
246
|
-
done
|
|
247
|
-
|
|
248
|
-
echo "$total"
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
# ============================================================================
|
|
252
|
-
# Cleanup
|
|
253
|
-
# ============================================================================
|
|
254
|
-
|
|
255
|
-
# Remove old test and lint log files
|
|
256
|
-
cleanup_test_logs() {
|
|
257
|
-
local log_dir
|
|
258
|
-
if declare -f get_test_log_dir &>/dev/null; then
|
|
259
|
-
log_dir=$(get_test_log_dir)
|
|
260
|
-
else
|
|
261
|
-
log_dir="$CLAUDE_PROJECT_DIR/.session"
|
|
262
|
-
fi
|
|
263
|
-
|
|
264
|
-
rm -f "$log_dir"/test-*-results-*.log 2>/dev/null
|
|
265
|
-
rm -f "$log_dir"/lint-*-results-*.log 2>/dev/null
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
# ============================================================================
|
|
269
|
-
# High-Level Test Running
|
|
270
|
-
# ============================================================================
|
|
271
|
-
|
|
272
|
-
# Run tests for a specific repo with logging
|
|
273
|
-
# Usage: run_repo_tests "Pennyfarthing-api" "$RUN_ID"
|
|
274
|
-
run_repo_tests() {
|
|
275
|
-
local repo="$1"
|
|
276
|
-
local run_id="${2:-$(generate_run_id)}"
|
|
277
|
-
|
|
278
|
-
local repo_path test_cmd log_path
|
|
279
|
-
if declare -f get_repo_full_path &>/dev/null; then
|
|
280
|
-
repo_path=$(get_repo_full_path "$repo")
|
|
281
|
-
test_cmd=$(get_test_command "$repo")
|
|
282
|
-
else
|
|
283
|
-
repo_path="$CLAUDE_PROJECT_DIR/$repo"
|
|
284
|
-
test_cmd=""
|
|
285
|
-
fi
|
|
286
|
-
|
|
287
|
-
if [[ -z "$test_cmd" ]]; then
|
|
288
|
-
echo "SKIP: $repo (no test command configured)"
|
|
289
|
-
return 0
|
|
290
|
-
fi
|
|
291
|
-
|
|
292
|
-
if [[ ! -d "$repo_path" ]]; then
|
|
293
|
-
echo "SKIP: $repo (path not found: $repo_path)"
|
|
294
|
-
return 0
|
|
295
|
-
fi
|
|
296
|
-
|
|
297
|
-
log_path=$(get_log_path "test-$repo" "$run_id")
|
|
298
|
-
|
|
299
|
-
# Setup environment for this repo
|
|
300
|
-
setup_repo_test_env "$repo"
|
|
301
|
-
|
|
302
|
-
echo "=== Testing $repo ==="
|
|
303
|
-
(cd "$repo_path" && eval "$test_cmd") 2>&1 | tee "$log_path"
|
|
304
|
-
local exit_code=${pipestatus[1]}
|
|
305
|
-
|
|
306
|
-
if [[ $exit_code -eq 0 ]]; then
|
|
307
|
-
echo "PASS: $repo"
|
|
308
|
-
else
|
|
309
|
-
echo "FAIL: $repo (exit code: $exit_code)"
|
|
310
|
-
fi
|
|
311
|
-
|
|
312
|
-
return $exit_code
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
# Run tests for all repos
|
|
316
|
-
# Usage: run_all_repo_tests "$RUN_ID"
|
|
317
|
-
run_all_repo_tests() {
|
|
318
|
-
local run_id="${1:-$(generate_run_id)}"
|
|
319
|
-
local failed=0
|
|
320
|
-
|
|
321
|
-
ensure_test_containers || {
|
|
322
|
-
echo "Warning: Container setup failed, continuing anyway"
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
if ! declare -f get_repos &>/dev/null; then
|
|
326
|
-
echo "Warning: repo-utils not loaded, cannot iterate repos"
|
|
327
|
-
return 1
|
|
328
|
-
fi
|
|
329
|
-
|
|
330
|
-
for repo in $(get_build_order); do
|
|
331
|
-
if ! run_repo_tests "$repo" "$run_id"; then
|
|
332
|
-
((failed++)) || true
|
|
333
|
-
fi
|
|
334
|
-
done
|
|
335
|
-
|
|
336
|
-
return $failed
|
|
337
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# compute-theme-tiers.sh - Compute tier rankings from job-fair results
|
|
3
|
-
#
|
|
4
|
-
# Uses the MOST COMPLETE run for each theme (most matrix entries),
|
|
5
|
-
# not the most recent. This prevents incomplete runs from overriding good data.
|
|
6
|
-
#
|
|
7
|
-
# Usage: compute-theme-tiers.sh [--dry-run] [--verbose] [--min-entries N]
|
|
8
|
-
|
|
9
|
-
set -euo pipefail
|
|
10
|
-
|
|
11
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
12
|
-
|
|
13
|
-
exec python3 "$SCRIPT_DIR/compute_theme_tiers.py" "$@"
|