Commit graph

13 commits

Author SHA1 Message Date
246ed886db Fold Tier C surface into existing fuzz targets; closes #312
Extends the five existing targets to cover the remaining gaps from #312
without new files:

- property_types     Line/Circle/Arc setters, Scene.children collection ops
                     (index/count/find/insert/slice/pop), module functions
                     find/find_all/bresenham/lock. Benchmark triplet excluded
                     (end_benchmark writes a file per call).
- grid_entity        grid.at / [x,y] / entities_in_radius / center_camera /
                     hovered_cell, and GridPoint named-layer __getattr__/
                     __setattr__.
- pathfinding_behavior  Grid.find_path + full AStarPath (peek/__len__/__bool__/
                     iteration) that path_from didn't reach.
- fov                ColorLayer perspective (apply/update/clear_perspective)
                     and draw_fov.
- maps_procgen       ColorLayer/TileLayer apply_threshold/apply_ranges/
                     apply_gradient from HeightMap sources.

The full instrumented campaign surfaced five new bugs, filed as #321 (HIGH
ColorLayer.draw_fov bad-free), #322 (WangSet.terrain_enum error-pending
abort), #323/#324/#325 (float->int UB in pitch_shift/hsl_shift/Vector). Per
decision, this issue delivers fuzz coverage only; the bugs are tracked
separately.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KnywUddaFRhkxo5kijxJnv
2026-06-21 16:45:03 -04:00
ab6aecd0b0 Add read-only Caption.font getter; addresses #320
The Caption class docstring listed `font` under its Attributes, but no getter
existed -- the PyUICaptionObject.font slot was GC-managed yet never populated by
init(). Wire it up:
  - init() now stores the supplied Font (incref) or, when none/None was given, a
    wrapper around the engine default font, so the getter reflects what is
    actually rendered rather than returning None.
  - New read-only `font` getset (consistent with Sprite.texture being read-only).

Regenerated API docs/stubs/man page and rebaselined the api-surface snapshot
(one added line: Caption `prop font: Font (ro)`). Frozen docstring gate 100%,
suite 297/297.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KnywUddaFRhkxo5kijxJnv
2026-06-21 12:18:53 -04:00
5eecb2b2b0 Rewrite stale Animation-ctor unit tests to drawable.animate()
test_animation_raii and test_animation_property_locking called the
mcrfpy.Animation(...) constructor, which was removed from the module export
during the API freeze. The Animation type still exists (returned by
drawable.animate()) and every behavior these tests check is intact:
  - hasValidTarget()/complete()/stop() on the returned handle (weak-target RAII)
  - conflict_mode 'replace'/'queue'/'error' + invalid-mode ValueError (#120)

Ported both to drawable.animate(prop, target, seconds, easing, conflict_mode=).
This file is the suite's only conflict_mode coverage, so it was rewritten rather
than deleted. Durations converted ms -> s. Suite now 297/297.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KnywUddaFRhkxo5kijxJnv
2026-06-21 12:11:37 -04:00
2ada7178ad ROADMAP: mark #317/#318/#319 shipped; open count now 22
#317/#318/#319 (the #314 verify-pass code bugs) are fixed and merged; moved from
Active Follow-Ups to Recently Shipped. #312 remains the sole active follow-up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KnywUddaFRhkxo5kijxJnv
2026-06-21 10:14:11 -04:00
265425321c Windowed perspective writeback in UIEntity::updateVisibility; closes #316
Clip the demote+promote passes in updateVisibility() to an AABB sized to
fov_radius instead of two full-W*H walks per entity. A prev_fov window cache
demotes last tick's promoted rect (not the current one) so a moving entity
leaves no trailing "ghost vision". On a 1000x1000 grid the Phase 5.2 benchmark's
flat ~25-36 ms/entity writeback overhead collapses to single-digit microseconds
(384x-6577x speedup on the cheap algorithms; below timing noise on the rest).

Adversarial verify caught a regression the happy-path test missed: the
documented from_bytes -> assign -> update_visibility() load/resume path left
permanent ghost-VISIBLE cells, because prev_fov only bounds engine-promoted
cells. Fixed with a one-shot perspective_full_demote_pending flag (full demote
only on the tick after an external assignment; per-turn hot path stays
windowed). Documented the engine-owned demote contract on the perspective_map
property.

- src/UIEntity.cpp/.h: windowed demote/promote, prev_fov cache, demote flag
- src/DiscreteMap.cpp/.h: demoteVisibleRect(x0, y0, x1, y1)
- tests/regression/issue_316_sparse_perspective_test.py: 7-section regression
  (equivalence matrix, radius-0, moving disjoint, trailing-edge, grid resize,
  load/resume assignment, AABB margin lock)
- docs regenerated for the perspective_map docstring change

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KnywUddaFRhkxo5kijxJnv
2026-06-21 09:40:05 -04:00
3f39ee0320 ROADMAP: mark #314 complete (F15 + strict gate); note #317-319
API audit follow-through done: F15 macro conversion (289 slots, 20 frozen
files, 100% compliant), accuracy-corrected, and locked by a strict
frozen-docstring gate in the doc pipeline. Verify-pass code bugs tracked as
#317/#318/#319.

closes #314

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 06:47:21 -04:00
20b87a5993 ROADMAP: mark #313 shipped, #314 doc follow-through in progress
#313 merged to master (UIEntity::grid -> GridData, entity.texture).
#314 API-surface snapshot test landed; remaining doc loop (F15 macro
conversion + regen/verify against the 93-item catalog) now in progress.
Open-issue count 25 -> 24.

Refs #314

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 23:42:24 -04:00
74131e78e4 Update ROADMAP: bump to 0.2.8-7DRL-2026; record #313/#314 branch progress
- Version bumped to 0.2.8-7DRL-2026
- Note API-surface snapshot regression test locking freeze decisions (#314)
- Move #313 (UIEntity::grid -> shared_ptr<GridData>, new entity.texture) and
  #314 to an "On Deck (pending merge)" section; trim from Active Follow-Ups

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 23:30:28 -04:00
7ce933098d ROADMAP: post-7DRL refresh -- fuzz sweep cleared, Phase 4.5/5.2/5.3 shipped
Reflects the actual state of master after the April 2026 push:
- Active tier1 queue is empty (#309/#310/#311 all closed in mid-April).
- Recently shipped section captures #294 (Entity.perspective_map as
  3-state DiscreteMap), #315 (pathfinding heuristics + multi-root + FLEE
  primitives + interactive demo), Phase 5.2 benchmarks, Phase 5.3 docs.
- Active follow-ups now reads #312 (fuzz extension), #313 (UIEntity::grid
  -> GridData), #314 (API audit follow-through), #316 (sparse perspective
  writeback).
- Open-issue count corrected 30 -> 25; outdated groupings (#233-#237
  multi-tile, #238-#240 WASM trio, #218 anim targets) replaced.
- Version bump 0.2.6 -> 0.2.7-prerelease.
2026-04-18 11:24:31 -04:00
4404d1082a Update roadmap for 7DRL 2026 and post-jam 1.0 planning
Rewrite ROADMAP.md to reflect current project state:
- Summarize 0.2 series shipped features (3D/voxel, procgen, Tiled/LDtk,
  WASM, animation callbacks, multi-layer grids, doc macros)
- 7DRL 2026 dates (Feb 28 - Mar 8) and remaining prep
- Post-jam priorities: API freeze process, pain point fixes,
  roguelikedev tutorial series, pip/virtualenv integration
- Engine eras model (McRogueFace -> McVectorFace -> McVoxelFace)
- Future directions: McRogueFace Lite (MicroPython/PicoCalc),
  standard library widgets, package management
- Open issue groupings (30 issues across 8 areas)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:18:12 -05:00
8f8b72da4a feat: auto-exit in --headless --exec mode when script completes
Closes #127

Previously, `./mcrogueface --headless --exec <script>` would hang
indefinitely after the script completed because the game loop ran
continuously. This required external timeouts and explicit mcrfpy.exit()
calls in every automation script.

This commit adds automatic exit detection for headless+exec mode:
- Added `auto_exit_after_exec` flag to McRogueFaceConfig
- Set flag automatically when both --headless and --exec are present
- Game loop exits when no timers remain (timers.empty())

Benefits:
- Documentation generation scripts work without explicit exit calls
- Testing scripts don't need timeout wrappers
- Clean process termination for automation
- Backward compatible (scripts with mcrfpy.exit() continue working)

Changes:
- src/McRogueFaceConfig.h: Add auto_exit_after_exec flag
- src/main.cpp: Set flag and recreate engine with modified config
- src/GameEngine.cpp: Check timers.empty() in game loop
- ROADMAP.md: Mark Phase 7 as complete (2025-10-30)
- CLAUDE.md: Add instruction about closing issues with commit messages

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 22:52:52 -04:00
5205b5d7cd docs: Add Gitea-first workflow guidelines to project documentation
Establish Gitea as the single source of truth for issue tracking,
documentation, and project management to improve development efficiency.

CLAUDE.md changes:
- Add comprehensive "Gitea-First Workflow" section at top of file
- Document 5 core principles for using Gitea effectively
- Provide workflow pattern diagram for development process
- List available Gitea MCP tools for programmatic access
- Explain benefits: reduced context switching, better planning, living docs

ROADMAP.md changes:
- Add "Development Workflow" section referencing Gitea-first approach
- Include 5-step checklist for starting any work
- Link to detailed workflow guidelines in CLAUDE.md
- Emphasize Gitea as single source of truth

Workflow principles:
1. Always check Gitea issues/wiki before starting work
2. Create granular, focused issues for new features/problems
3. Document as you go - update related issues when work affects them
4. If docs mislead, create task to correct/expand them
5. Cross-reference everything - commits, issues, wiki pages

Benefits:
- Avoid re-reading entire codebase by consulting brief issue descriptions
- Reduce duplicate or contradictory work through better planning
- Maintain living documentation that stays current
- Capture historical context and decision rationale
- Improve efficiency using MCP tools for programmatic queries

This establishes best practices for keeping the project organized and
reducing cognitive load during development.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 00:56:21 -04:00
3c20a6be50 docs: Streamline ROADMAP.md and defer to Gitea issue tracking
Removed stale data and duplicate tracking from ROADMAP.md to establish
Gitea as the single source of truth for issue tracking.

Changes:
- Removed outdated urgent priorities from July 2025 (now October)
- Removed extensive checkbox task lists that duplicate Gitea issues
- Removed "Recent Achievements" changelog (use git log instead)
- Removed dated commentary and out-of-sync issue statuses
- Streamlined from 936 lines to 207 lines (~78% reduction)

Kept strategic content:
- Engine philosophy and architecture goals
- Three-layer grid architecture decisions
- Performance optimization patterns
- Development phase summaries with Gitea issue references
- Future vision: Pure Python extension architecture
- Resource links to Gitea issue tracker

The roadmap now focuses on strategic vision and architecture decisions,
while deferring all task tracking, bug reports, and current priorities
to the Gitea issue tracker.

Related: All issue status tracking moved to Gitea
See: https://gamedev.ffwf.net/gitea/john/McRogueFace/issues

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 00:46:17 -04:00