Skip to content

P6 Task 10b: Rebase to clean-pr and Push to Upstream #127

@Sam-Bolling

Description

@Sam-Bolling

Task

Create a safety tag on clean-pr, cherry-pick the two implementation commits (14 + 15) from phase-6 to clean-pr, push to the upstream fork via --force-with-lease, and update PR #136's description. This is the final delivery step — it makes the Phase 6 work visible to the upstream reviewer (jahow).

ROADMAP Reference: Phase 6, Task 10b — Rebase to clean-pr and Push to Upstream (~0.5 hours, Low complexity)
Implementation Branch: phase-6clean-pr


Files to Create or Modify

File Action Purpose
(none) N/A This task creates no new files and modifies no source code — it performs git operations and updates PR metadata

This is a git operations + PR update task, not a code authoring task.

Blueprint Reference

Scope — What to Implement

Point-of-No-Return Checklist (PRE-FLIGHT)

Before ANY git operations on clean-pr, confirm every item:

  • All V1–V4 boundary verification gates passed (Task 10a)
  • All C1–C5 CI gates passed (Task 10a)
  • Litmus test passed — core compiles without CSAPI (Task 10a)
  • B1–B3 behavioral tests passed (Task 10a)
  • phase-6 branch pushed to origin (Task 10a)

If any item above is unchecked, STOP — return to Task 10a.

Step 1: Create Safety Tag

git checkout clean-pr
git tag pre-refactor-backup HEAD

This preserves the current clean-pr HEAD (3061c68, 13 commits above upstream/main) so it can be restored if the cherry-pick causes problems.

Rollback command: git push clean-fork pre-refactor-backup:clean-pr --force-with-lease

Step 2: Cherry-Pick Implementation Commits

# Cherry-pick ONLY the two implementation commits (NOT research docs)
git cherry-pick <commit-14-hash> <commit-15-hash>
  • Commit 14: Formatting + ESLint fixes (Phase A — style(csapi): apply Prettier and fix ESLint...)
  • Commit 15: Architecture refactoring (Phase B — refactor(csapi): decouple from endpoint...)

Important: Do NOT cherry-pick research/planning commits — only code-change commits move to clean-pr.

Step 3: Verify Commit Count

git log --oneline upstream/main..clean-pr

Expected: Exactly 15 commits (13 existing + 2 new).

If the count is wrong:

  • Too few → cherry-pick missed a commit
  • Too many → extra commits picked up; reset and retry

Step 4: Quick Re-Verification on clean-pr

# Verify the cherry-picked code still passes on clean-pr
npm run typecheck
npm run test:browser
npm run test:node

All must exit 0. This confirms the cherry-pick applied cleanly.

Step 5: Push to Upstream Fork

git push --force-with-lease clean-fork clean-pr

Step 6: Update PR #136 Description

Update the PR description to document:

  • The new "./csapi" sub-path consumer API
  • The 2-commit structure (formatting + architecture)
  • The 12-gate verification summary
  • Respond to jahow's review thread confirming the requirements are met

Failure Protocol

Scenario Action
Cherry-pick conflict Abort cherry-pick, investigate on phase-6, fix, re-attempt
Tests fail on clean-pr Reset clean-pr to pre-refactor-backup, fix on phase-6, re-attempt
Wrong commit count Reset clean-pr to pre-refactor-backup, verify commit hashes, re-attempt
Force-push rejected Check if the remote changed unexpectedly; use --force-with-lease (not --force)

In all failure cases: The pre-refactor-backup tag provides a safe rollback point.

Testing Requirements

  • Re-run typecheck, test:browser, test:node on clean-pr after cherry-pick (Step 4)
  • No new tests — this task moves existing verified commits to a new branch

Scope — What NOT to Touch

  • ❌ Do NOT modify any source files — if cherry-pick fails, investigate and fix on phase-6
  • ❌ Do NOT use git push --force — always use --force-with-lease
  • ❌ Do NOT cherry-pick research/planning commits — only Commits 14 and 15
  • ❌ Do NOT delete the pre-refactor-backup tag — it is the rollback safety net
  • ❌ Do NOT modify the phase-6 branch — all changes happen on clean-pr
  • ❌ Do NOT change any CSAPI business logic
  • ❌ Do NOT run verification gates from scratch — Task 10a already confirmed them; Step 4 is a quick re-check only

Acceptance Criteria

  • pre-refactor-backup tag created on old clean-pr HEAD (3061c68)
  • Commits 14 + 15 cherry-picked to clean-pr cleanly (no conflicts)
  • git log --oneline upstream/main..clean-pr shows exactly 15 commits
  • npm run typecheck passes on clean-pr
  • npm run test:browser passes on clean-pr
  • npm run test:node passes on clean-pr
  • git push --force-with-lease clean-fork clean-pr succeeds
  • PR D-1: Resolve SystemTypeUris name collision between model.ts and constants.ts #136 description updated to document new consumer API and 2-commit structure
  • jahow's review thread responded to (if applicable)

Dependencies

Blocked by: Task 10a — Boundary Verification and Litmus Test (all 12 gates must pass)
Blocks: Nothing — this is the final delivery task in Phase 6


Operational Constraints

⚠️ MANDATORY: Before starting work on this issue, review docs/governance/AI_OPERATIONAL_CONSTRAINTS.md.

For Phase 6 issues: Review the P6 Implementation Guide §11 for the branching strategy and rebase path.

Key constraints for this task:

  • Precedence: OGC specifications → AI Collaboration Agreement → This issue description → Existing code → Conversational context
  • No code fixes on clean-pr: If cherry-pick fails or tests fail, return to phase-6 to fix, then re-attempt
  • Safety first: Always create pre-refactor-backup tag BEFORE any cherry-pick or force-push
  • Force-with-lease only: Never use --force without --with-lease

Phase 6 Task-Specific Scope Boundaries

  • Task 10a must pass ALL 12 verification gates before Task 10b begins
  • Task 10b (this task) must NOT modify source code — git operations and PR metadata only
  • Split rationale: Task 10a is fully local and reversible; Task 10b modifies remote state visible to the upstream reviewer. See Task Granularity Review.

References

Primary References (must read)

# Document What It Provides
1 P6 Implementation Guide §11 Branching strategy, rebase path diagram, point-of-no-return checklist
2 P6 ROADMAP Task 10b Task definition, git commands, deliverables
3 P6 Contribution Goal Acceptance criteria and success condition
4 Risk Register #4 Force-push risk mitigation: pre-refactor-backup + --force-with-lease
5 Task Granularity Review 10a/10b split rationale at verify/deliver boundary

Repository Map

Repository Branch Role
ogc-client-CSAPI_2 main Archive — untouched. Preserves complete Phase 1–5 state.
ogc-client-CSAPI_2 phase-6 Implementation workspace. Research docs + implementation commits.
clean-pr repo clean-pr branch Contribution-ready fork. 13 commits above upstream/main, HEAD at 3061c68. After this task: 15 commits.

Rebase Flow

phase-6 branch (ogc-client-CSAPI_2)
  ├── Research/planning commits (stay here — NOT rebased)
  └── Commits 14 + 15 (code changes only)
              ↓ cherry-pick
        clean-pr branch: 15 commits (13 existing + 2 new)
              ↓ push --force-with-lease
        clean-fork remote → PR #136 updated
              ↓
        Draft PR ready for jahow's review

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions