Skip to content

balance(levels): apply 4 valid analyser recommendations (refs #19)#131

Open
hyperpolymath wants to merge 2 commits into
mainfrom
balance/apply-4-valid-recs
Open

balance(levels): apply 4 valid analyser recommendations (refs #19)#131
hyperpolymath wants to merge 2 commits into
mainfrom
balance/apply-4-valid-recs

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

Applies the four valid recommendations from `balance-report.json` to `LevelConfig.res`. The three `guard_patrol_radius` recommendations were skipped — those values were corrupted by the analyser bug fixed in #128 and need a re-run before they're trustworthy.

# Level Parameter Change Mechanism
1 city alert_threshold 0.25 → 0.40 `hasPowerSystem: false → true` (+0.15)
2 security defence_density 0.190 → 0.143 drop `cascadeTrap` from DB-SERVER
3 backbone guard_spawn_rate 1.2 → 0.80 remove edge AntiHacker (x=700); Expert count 3→2
4 backbone defence_density 0.524 → 0.381 drop `cascadeTrap`+`timeBomb` from NA-BACKBONE; drop `cascadeTrap` from ATLAS-ROUTER

Rationale per rec is in the commit body. Gameplay impact:

  • Tutorial city: marginally less trivial — 99.8% → expected ~85% win rate
  • Security: 64% trap-deaths → unhooks the cascade chain
  • Backbone: 0% → target 15-25% win rate (the long-standing punishingly-hard outlier)

Follow-up

Three `guard_patrol_radius` recommendations remain ungated:

  • city.guard_patrol_radius
  • dmz.guard_patrol_radius
  • scada.guard_patrol_radius

These need `balance-report.json` regenerated against the #128 analyser fix (which adds a `mean_patrol_radius` field to `LevelStats` and uses it correctly). Tracked separately.

Refs #19

🤖 Generated with Claude Code

Applies the four valid recommendations from balance-report.json. The
three `guard_patrol_radius` recs were skipped — they were corrupted by
the analyser bug fixed in #128 and need re-running before they're
trustworthy.

Applied:
1. **city.alert_threshold 0.25 → 0.40** — enable hasPowerSystem. Tutorial
   win rate was 99.8% (no challenge). UPS adds detection threshold +0.15
   without introducing trap mechanics that don't belong in the tutorial.
2. **security.defence_density 0.190 → 0.143** — drop cascadeTrap from
   DB-SERVER. 64% of deaths were trap-cascades; canary still detects
   scans, SIEM still receives alerts via the standard pipeline.
3. **backbone.guard_spawn_rate 1.2 → 0.84** — remove backbone_edge
   AntiHacker (x=700). Win rate was 0% even after v2; the edge AntiHacker
   was the last density bottleneck before the Assassin. Bumps Expert
   guard count 3 → 2 in `getGuardCountForDifficulty` accordingly.
4. **backbone.defence_density 0.524 → 0.393** — drop cascadeTrap+timeBomb
   from NA-BACKBONE and cascadeTrap from ATLAS-ROUTER. 67% of deaths
   were trap-deaths; killSwitch + whitelist remain as the genuine
   expert-tier gating, but the trap-cascade chains that made the level
   un-recoverable are gone.

Three remaining recs (city / dmz / scada `guard_patrol_radius`) need
`balance-report.json` to be regenerated against the #128 analyser fix
before they can be applied — they currently report guard_spawn_rate
values under the wrong field name. Tracked as follow-up.

Refs #19

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com>
…ures for balance recs

Tests asserted on the OLD baseline values from before the balance analyser
recommendations were applied. With #131 applying the 4 valid recs to
LevelConfig.res, these assertions now hold the new values:

- 'expert difficulty has 3 guards' → 2 (rec: backbone guard_spawn_rate 1.2 → 0.80)
- 'city has no power system' → 'has power system' (rec: city alert_threshold 0.25 → 0.40)

Also renamed the monotonicity check from 'increases' → 'is monotonic non-decreasing'
since Tutorial=Easy=2 now and we only assert ≤.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com>
hyperpolymath added a commit that referenced this pull request Jun 1, 2026
## Summary

Refreshes `ROADMAP.md` + `.machine_readable/6a2/STATE.a2ml` to reflect
the 2026-06-01 session closeout:

**ROADMAP.md**
- Current State: balance analyser line updated — 4 of 7 recommendations
applied, 3 patrol-radius recs deferred pending Julia regen
- Near-Term: dropped the balance-application item (done) and the
Playwright residuals item (done); kept Julia-regen + bestpractices.dev +
editor rewrite
- New `Completed (2026-06-01 session)` section: balance recs
application, analyser patrol_radius fix, Playwright residuals split,
Burble rename

**STATE.a2ml**
- `last-updated`: 2026-05-03 → 2026-06-01
- `test-status`: updated to 2011+ tests across 211 modules
- `route-to-mvp`: Grumble → Burble; balance application moved to
`applied`; idaptik#84 added
- `critical-next-actions`: Julia regen first; #84 wait on
affinescript#228
- `session-history.2026-06-01`: new entry with PRs merged/armed + issues
closed/open

## Cross-references

- Companion wiki update at `hyperpolymath/idaptik.wiki@0d8ab7f` (Home.md
Current State + Recent Sessions + Burble note)
- Sibling PR #131 (balance recs to LevelConfig.res) — still cycling at
filing time; this PR's wording is timing-safe either way

## Test plan

- [ ] CI green (governance + scan + A2ML + K9 + ReScript Compile)
- [ ] No file content beyond `ROADMAP.md` +
`.machine_readable/6a2/STATE.a2ml`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

🔍 Hypatia Security Scan

Findings: 71 issues detected

Severity Count
🔴 Critical 11
🟠 High 18
🟡 Medium 42

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Issue in boj-build.yml",
    "type": "missing_timeout_minutes",
    "file": "boj-build.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in build-validation.yml",
    "type": "missing_timeout_minutes",
    "file": "build-validation.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in cflite-pr.yml",
    "type": "missing_timeout_minutes",
    "file": "cflite-pr.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in codeql.yml",
    "type": "missing_timeout_minutes",
    "file": "codeql.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in containers.yml",
    "type": "missing_timeout_minutes",
    "file": "containers.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in containers.yml",
    "type": "missing_timeout_minutes",
    "file": "containers.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dco.yml",
    "type": "missing_timeout_minutes",
    "file": "dco.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

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.

1 participant