Skip to content

Feat/3 code gen tool: Release v1.2.0 - CLI Project Generator - #22

Merged
ikelaiah merged 12 commits into
mainfrom
feat/3-code-gen-tool
Jul 27, 2026
Merged

Feat/3 code gen tool: Release v1.2.0 - CLI Project Generator#22
ikelaiah merged 12 commits into
mainfrom
feat/3-code-gen-tool

Conversation

@ikelaiah

@ikelaiah ikelaiah commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

This release adds cli-fp-gen, a standalone scaffold generator that creates
compilable cli-fp applications from a versioned JSON project specification.
It also adds cross-platform CI for both the framework and generator, strengthens
generated-file safety, and fixes boolean default-value lookup behavior.

Type of change

  • New feature (backward-compatible)
  • Bug fixes
  • Documentation
  • Test and CI improvements
  • Breaking change

Generator functionality

  • Initialize a new project with init
  • Regenerate project infrastructure from clifp.json
  • Add root and nested commands
  • Remove commands, with explicit cascade removal for subtrees
  • Generate all supported parameter registrations
  • Preview changes with --dry-run
  • Preserve user-owned command stubs unless --force is supplied
  • Clean stale generator-owned files through a manifest

Review fixes

  • Existing clifp.json files are protected during init
  • Invalid command separators are rejected instead of silently rewritten
  • Conflicting generated Pascal identifiers are detected before writing files
  • Reserved Pascal application names produce valid program identifiers
  • Program and manifest paths are guarded against project-directory escape
  • Manifest path comparisons follow platform casing rules
  • Manifest cleanup refuses paths that traverse Unix symbolic links or Windows
    reparse points, including directory junctions
  • Malformed project specifications release partially constructed commands and
    parameters safely
  • Boolean defaults satisfy the documented GetParameterValue contract
  • Test compilers write to temporary directories instead of dirtying the source
    tree

Testing

Framework

  • 30 FPCUnit framework tests pass
  • Lazarus package compiles as version 1.2.0
  • All six shipped example applications compile

Generator

  • Focused naming, validation, and malformed-spec ownership tests pass
  • Golden output matches expected generated source
  • Generated application compiles and runs
  • init, generate, add command, and remove command operations pass
  • Dry-run behavior is non-mutating
  • User-owned command stubs are preserved
  • Program and manifest path guards are covered, including Unix symlink and
    Windows junction escape attempts

CI

  • Linux job configured
  • Windows job configured
  • Read-only repository permissions
  • Manual workflow dispatch
  • Job timeouts

Release metadata

  • README version badge updated to 1.2.0
  • Lazarus package version updated to 1.2.0
  • CHANGELOG.md promoted from Unreleased to 1.2.0
  • Release notes added
  • Generator and testing documentation updated

Compatibility

This is a backward-compatible minor release. Existing framework APIs remain
supported, and the optional generator does not change how existing applications
are built.

Documentation

- Improve duplicate command error messages to name the conflicting
  sibling and parent instead of just the full path
- Make schema version mismatch error actionable with migration hint
  and add TODO marker for v2 guidance
- Document NormalizeCommandName backslash behaviour on Windows
- Document MakeProgramFileRelPath PascalCase filename convention
- Add --dry-run example output to help text
- Update CHANGELOG and README accordingly
- harden command validation, overwrite protection, and manifest cleanup
- add generator unit, golden, compile-smoke, and operations tests
- run framework and generator suites on Linux and Windows CI
- fix boolean parameter defaults and update generator documentation
- bump package metadata to v1.2.0 and add release notes
- remove tracked code-generation scratch artifacts
@ikelaiah ikelaiah self-assigned this Jul 27, 2026
@ikelaiah ikelaiah added the enhancement New feature or request label Jul 27, 2026
ikelaiah added 5 commits July 27, 2026 13:43
- make SpecIO ownership exception-safe for malformed specifications
- reject manifest deletion through symlinks and Windows reparse points
- add memory-leak and cross-platform path-safety regression tests
- document ownership, extension steps, and beginner setup
- correct FPC generator build commands
@ikelaiah
ikelaiah merged commit 8935b1f into main Jul 27, 2026
2 checks passed
@ikelaiah
ikelaiah deleted the feat/3-code-gen-tool branch July 27, 2026 09:27
@ikelaiah ikelaiah linked an issue Jul 27, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SUGGESTION] Code generation tool

1 participant