Skip to content

Updating Morphir.SDK.Testing as well#11

Merged
DamianReeves merged 3 commits intofinos:masterfrom
psmulovics:master
Apr 1, 2020
Merged

Updating Morphir.SDK.Testing as well#11
DamianReeves merged 3 commits intofinos:masterfrom
psmulovics:master

Conversation

@psmulovics
Copy link
Contributor

Proposed Changes

Another file found regards #5

Types of changes

What types of changes does your code introduce to Morphir.IR?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • Build and tests pass locally
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Further comments

CI would confirm

@psmulovics psmulovics requested a review from DamianReeves April 1, 2020 19:29
Copy link
Member

@DamianReeves DamianReeves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@DamianReeves DamianReeves merged commit de0f023 into finos:master Apr 1, 2020
DamianReeves pushed a commit that referenced this pull request Dec 13, 2025
* Update Morphir.IR.fsproj

Fixing the conditional build for linux

* Update Morphir.SDK.Testing.fsproj
DamianReeves added a commit that referenced this pull request Dec 18, 2025
…gotchas

- Added new section "JSON Serialization with System.Text.Json"
- Documents 5 common gotchas when using System.Text.Json with F#:
  1. F# records require FSharp.SystemTextJson for deserialization
  2. Discriminated unions not supported by default
  3. Option types serialize as objects without converter
  4. JsonElement reading patterns with active patterns
  5. Handling nulls vs Options in JSON/C# interop
- Includes best practices for JSON in F# scripts
- CLI JSON output patterns with stdout/stderr separation
- Real examples from prepare-release.fsx
- Source generator patterns for Native AOT
- Updated table of contents (added section 7)
- Updated summary with new guideline #11
- Added references to FSharp.SystemTextJson and serialization-guide.md

Addresses user request for JSON serialization hints and gotchas.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
DamianReeves added a commit that referenced this pull request Dec 18, 2025
* feat: Add Release Manager skill design and documentation

Add comprehensive Release Manager skill for automating the complete release
lifecycle including preparation, execution, monitoring, verification, and
recovery.

Key Features:
- Release preparation with pre-flight validation
- Deployment workflow monitoring with token-efficient automation
- Post-release verification and QA coordination
- Failed release recovery from checkpoint
- Comprehensive release playbooks (standard, hotfix, pre-release, recovery)
- Full JSON output support for automation (--json flag)

Design Highlights:
- Flexible local state requirements (advisory, not blocking)
- monitor-release.fsx reduces LLM token usage by ~80%
- Strict CLI logging standards (stdout/stderr separation)
- Integration with QA Tester skill
- GitHub issue-based release tracking
- "What's New" documentation generation

Files Added:
- .claude/skills/release-manager/skill.md (1,500+ lines)
  - Complete skill prompt with release playbooks
  - Version management and changelog guidance
  - 4 release workflow playbooks
  - QA integration patterns

- .claude/skills/release-manager/README.md (1,000+ lines)
  - Quick start guide
  - 4 automation script specifications with JSON schemas
  - CLI logging standards section
  - Testing procedures for JSON output
  - Troubleshooting and best practices

- .claude/skills/release-manager/templates/release-tracking.md
  - GitHub issue template for release tracking
  - 5-phase release checklist
  - Metrics tracking
  - Command reference

Automation Scripts (to be implemented):
- prepare-release.fsx - Pre-flight validation
- monitor-release.fsx - Workflow monitoring (token-efficient)
- validate-release.fsx - Post-release verification
- resume-release.fsx - Resume failed releases

All scripts will support --json flag following CLI logging standards.

Related: #219

* feat: Implement prepare-release.fsx with JSON output support

Add pre-flight validation script for release preparation with comprehensive
JSON output support following CLI logging standards.

Features:
- Remote CI status validation via GitHub Actions API
- CHANGELOG.md parsing and validation
- Intelligent version suggestion (major/minor/patch)
- NuGet version availability check
- Git tag conflict detection
- Optional local state advisory (non-blocking)
- Full JSON output support (--json flag)
- Strict stdout/stderr separation

JSON Output:
- stdout: Clean JSON only
- stderr: All logs and diagnostics
- Pipeable: script.fsx --json | jq works correctly

Command Line Options:
- --version VERSION: Specify version explicitly
- --json: Output JSON instead of human-readable
- --dry-run: No side effects
- --skip-local-check: Skip local git state check

Exit Codes:
- 0: Ready to release
- 1: Not ready (blocking issues)
- 2: Ready with warnings

Testing:
- JSON output validated with jq
- stdout/stderr separation verified
- Follows morphir-dotnet CLI logging standards

Related: #219

* feat: implement Release Manager automation scripts

Add three F# automation scripts for the Release Manager skill:

1. monitor-release.fsx
   - Monitor GitHub Actions workflow runs
   - Uses async workflows with cancellation support
   - Integrates gh CLI's watch feature
   - Updates tracking issues with workflow status
   - Supports JSON output and configurable timeouts

2. validate-release.fsx
   - Validate NuGet package availability
   - Test tool installation (dotnet tool install)
   - Run smoke tests from QA Tester skill
   - Update tracking issues with validation results
   - Comprehensive package and tool validation

3. resume-release.fsx
   - Analyze release tracking issues
   - Parse checklist to determine current phase
   - Detect failure points and suggest resume strategies
   - Trigger workflows or recommend manual steps
   - Support force resume for manual intervention

All scripts:
- Use Argu for command-line argument parsing
- Support --json flag for automation
- Use async workflows with CancellationToken
- Support configurable timeouts
- Follow CLI logging standards (stderr for logs, stdout for data)
- Integrate with GitHub CLI (gh) for API operations
- Update tracking issues with progress

Related to #219

🤖 Generated with Claude Code

* chore: add F# script dependencies to central package management

Add Argu, Spectre.Console, and System.Text.Json to Directory.Packages.props
to centrally manage versions for .claude/skills F# scripts.

Changes:
- Add Argu 6.2.4 for CLI argument parsing
- Add Spectre.Console 0.53.0 (required by WolverineFx dependency)
- Add System.Text.Json 9.0.0 for JSON serialization
- Update all F# scripts to use Spectre.Console 0.53.0

These packages are used by:
- Release Manager skill automation scripts (monitor, validate, resume)
- QA Tester skill smoke test scripts

Related to #219

🤖 Generated with Claude Code

* fix: resolve prepare-release.fsx issues with Spectre.Console markup and Int64

Fixes:
- Escape square brackets in Spectre.Console markup ([[Unreleased]])
- Change LatestRun type from int to int64 for GitHub workflow IDs
- Fix git log command format string
- Improve error handling and null checking
- Simplify JSON parsing by removing --jq flag

Tested and working:
- Human-readable output displays correctly
- JSON output validates with jq
- Remote CI status check works
- Changelog parsing works
- Version suggestion works

Related to #219

🤖 Generated with Claude Code

* docs: add comprehensive F# Coding Guide for agent instructions

- Created docs/contributing/fsharp-coding-guide.md with 8 major sections
- Emphasizes active patterns over if-then chains per project standards
- Covers pattern matching, error handling, immutability, async workflows
- Includes CLI script structure and logging standards
- Added examples from prepare-release.fsx (JSON handling, string parsing)
- Linked from AGENTS.md Section 5 (Coding Conventions)
- Referenced in CLAUDE.md for Claude Code-specific guidance

Addresses user request to document F# best practices in agent instructions.

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

* docs: add F# 9 nullable reference types guidance for C# interop

- Added comprehensive section on F# 9 nullable reference types
- Explains when to use nullable types vs Option<T>
- Includes patterns for converting between Option and nullable
- Emphasizes using nullable types only at C# interop boundaries
- Updated summary with new guideline (#10)
- Added F# 9 nullable reference types documentation link

Addresses user feedback to document nullable reference types for C# interop.

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

* docs: add comprehensive System.Text.Json guidance for F# with common gotchas

- Added new section "JSON Serialization with System.Text.Json"
- Documents 5 common gotchas when using System.Text.Json with F#:
  1. F# records require FSharp.SystemTextJson for deserialization
  2. Discriminated unions not supported by default
  3. Option types serialize as objects without converter
  4. JsonElement reading patterns with active patterns
  5. Handling nulls vs Options in JSON/C# interop
- Includes best practices for JSON in F# scripts
- CLI JSON output patterns with stdout/stderr separation
- Real examples from prepare-release.fsx
- Source generator patterns for Native AOT
- Updated table of contents (added section 7)
- Updated summary with new guideline #11
- Added references to FSharp.SystemTextJson and serialization-guide.md

Addresses user request for JSON serialization hints and gotchas.

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

* docs: add comprehensive Native AOT, trimming, and size optimization guide

- Created docs/contributing/aot-trimming-guide.md (~500 lines)
- Covers Native AOT compilation patterns and configuration
- Assembly trimming strategies (copyUsed vs link modes)
- Single-file executable setup and embedded resources
- Size optimization strategies (target: 5-15 MB depending on features)
- Reflection and dynamic code workarounds with source generators
- JSON serialization in AOT (System.Text.Json source generation)
- Platform-specific considerations (C# and F#)
- Common gotchas with solutions:
  * Assembly.GetTypes() incomplete in trimmed builds
  * LINQ expression trees fail in AOT
  * Type.GetType() returns null for trimmed types
  * WolverineFx handler discovery workarounds
  * Serilog sink compatibility
  * Spectre.Console AOT considerations
  * Embedded resource naming in AOT
- Testing strategies for AOT/trimmed builds
- Best practices checklist for design, implementation, testing
- Quick reference table of AOT-compatible patterns

Updated AGENTS.md:
- Added new section "Native AOT, Trimming, and Size Optimization"
- Linked to AOT/Trimming guide
- Established size targets for morphir CLI tools
- Referenced Issue #221 for tracking implementation

Related:
- Issue #221: Track AOT/trimming guidance implementation
- Addresses user request for AOT/trimming/single-file guidance

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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