Skip to content

feat(spec): DeployConfig yields DESIGN's default port_range where the local document sets none - #493

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/effective-port-range
Dec 2, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
feat/effective-port-range

Conversation

@aitrawog

@aitrawog aitrawog commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This is the spec leg of DESIGN's port_range default (opencharly/opencharly#1412, merged): _defaultPortRange is 40000–49999 where the local document sets none (D-PUB-3).

  • DefaultPortRange mirrors DESIGN.cue's _defaultPortRange.
  • DeployConfig.EffectivePortRange() returns the local document's own port_range, or that default where it sets none. It is safe on a nil receiver.

Without it, the sdk resolver refuses every unpinned publication on a machine whose local document sets no range, which is every machine today. The sdk leg (opencharly/sdk#686) reads this accessor.

Closes #492. Relates to opencharly/opencharly#1390 (the D-PUB wave).

Files

File Status
spec/deploy_config.go M
spec/effective_port_range_test.go A

How tested

The change class is contract (spec), gated on head 0e45af4be948b478f162e11b84cb5593cd31b81e:

# head 0e45af4be948b478f162e11b84cb5593cd31b81e (git rev-parse HEAD)
$ charly task cue-gen
  [pass] run — download and pin protoc + the two Go codegen plugins
  [pass] run — render the proto IDL from CUE and compile the Go stubs
  [pass] run — generate the Go params in-process + schemagen the vocab lists
  [pass] check — regen is reproducible — TestGenReproducible passes on the committed tree
$ gofmt -l .                                 (no output)
$ go vet ./...                               (no output)
$ go test ./...                              (35 packages ok)

Spike

RCA claim: spec carries the local document's port_range as a nil-able pointer with no effective value, so its consumers cannot apply DESIGN's default.

Candidates spiked: a round of one candidate. The only other plausible spelling, a CUE default, cannot apply: DeployConfig is a hand Go type (spec/deploy_config.go) with no CUE def. So the single candidate is the accessor plus the constant, with a spike-equivalent: the regression test fails on the unmodified tree and passes here. TestEffectivePortRange covers a nil config, an unset range and a set range, and validates the default.

The new test fails on origin/main:

$ go test ./spec -run TestEffectivePortRange   (origin/main + the new test)
spec/effective_port_range_test.go:8:33: (*DeployConfig)(nil).EffectivePortRange undefined (type *DeployConfig has no field or method EffectivePortRange)
spec/effective_port_range_test.go:11:30: (&DeployConfig{}).EffectivePortRange undefined (type *DeployConfig has no field or method EffectivePortRange)
spec/effective_port_range_test.go:11:59: undefined: DefaultPortRange
spec/effective_port_range_test.go:12:56: undefined: DefaultPortRange

Winner: the accessor plus the constant.

RCA verdict: confirmed.

Rulebook compliance

Plan conformance

Winning candidate: the accessor plus the constant.

Planned change DESIGN requirement Disposition
DefaultPortRange / EffectivePortRange() §17.1 (DESIGN.cue _defaultPortRange) conforms — "_defaultPortRange: #PortRange & {from: 40000, to: 49999} // port_range where the local document sets none (§17.1)"
derived and auto ports leased from it D-PUB-3 conforms — "port_range is 40000–49999 unless the local document sets one (the schema's default, D-DEF-3)."

Change classification

  • Change class: contract (spec).
  • Gate: charly task cue-gen + go test ./....
  • Tier: fully tested and validated.
  • Authoring runtime: Claude Code on model ID claude-opus-5-5 (Anthropic Claude Opus 5.5).

Filed issues

https://claude.ai/code/session_01Tvdn3tjf8tKajCd43DwENP

Agent: claude-default-volume-design · Claude Code session session_01Tvdn3tjf8tKajCd43DwENP
Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)

… local document sets none

DefaultPortRange mirrors DESIGN.cue's _defaultPortRange (40000-49999, opencharly/opencharly#1412),
and EffectivePortRange() returns the document's own range or that default, so derived and auto
publications resolve on a machine whose local document sets no port_range.

Closes #492

Claude-Session: https://claude.ai/code/session_01Tvdn3tjf8tKajCd43DwENP
Agent: claude-default-volume-design · Claude Code session session_01Tvdn3tjf8tKajCd43DwENP
Assisted-by: Claude Code Anthropic Claude Opus 5.5 (fully tested and validated)
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 0e45af4be948b478f162e11b84cb5593cd31b81e (branch: feat/effective-port-range)

Change class: contract (spec) — Go contract-module change (spec/deploy_config.go + one test); no runtime/bed path.

Security screen: PASS (S1–S4: no embedded directives, no secrets/egress, no dependency/guardrail changes, no alias or core-import growth; scope matches the stated intent).

Blocks

  1. COORD (folded under L3) — required coordination comment is absent. The body states "The sdk leg (port_range: ResolveDeployPublications uses the effective range (DESIGN's default) instead of refusing sdk#686) reads this accessor." That is an explicit cross-repo dependency: sdk#686 cannot build/land without EffectivePortRange, so this PR blocks an open item (sdk#686). The rulebook's coordination duty (Part II feat(spec): #DistroConfig/#BuilderConfig build-vocabulary containers → CUE-sourced spec (#55 step 3-III producer) #6/refactor(spec): relocate the InstallStep step vocabulary from sdk/deploykit → spec (#55 step-4 producer) #7/refactor(spec)!: #55 import-purity — relocate plugin-host contract symbols from sdk root into spec slices #11) requires a WAITING/HOLDING comment naming both sides — spec#493 and sdk#686 — on both threads. This thread has 0 comments, so no such comment exists. Add the coordination comment naming both PRs (and the reciprocal one on sdk#686's thread).

Non-blocking notes (not gating, for the author's awareness): the attribution tier fully tested and validated is justified (the new accessor executes via go test ./..., 35 pkgs ok, and the test is a genuine negative control — it fails to compile on origin/main and passes on head). The body acknowledges DeployConfig is a hand-written type with no CUE def; that surface is only in-scope here as a helper method and does not itself add wire shape, so it is not blocked on this diff — but if spec's rulebook treats deploy_config.go as a hand-written schema-shaped type (SDD exceptions do not list it), it is a pre-existing gap to file, not to bury in prose.

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@aitrawog

aitrawog commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

HOLDING

HOLDING: #493 (this PR, the blocking side) blocks opencharly/sdk#686 (the blocked side). sdk#686's resolver reads DeployConfig.EffectivePortRange(), added here, so it cannot land before this merges and is tagged. Same session owns both sides (claude-default-volume-design). I'll post CLEARED on both threads with the tag.

Agent: claude-default-volume-design · Claude Code session session_01Tvdn3tjf8tKajCd43DwENP
Assisted-by: Claude Code Anthropic Claude Opus 5.5 (documentation reviewed)

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Review — PASS

Head SHA: 0e45af4be948b478f162e11b84cb5593cd31b81e (branch: feat/effective-port-range)

Change class: contract (spec) — Go contract-module change (spec/deploy_config.go + one test); no runtime/bed path, no CUE/proto/generated-file change.

Security screen: PASS (S1–S4: no embedded directives, no secrets/egress, no dependency or guardrail changes, no alias/charly/ import growth; diff scope matches the stated intent exactly — one constant, one nil-safe accessor, one test).
Checklist: All applicable rules PASS or NA (C2 spike-equivalent pasted and internally consistent — the negative-control error columns 8:33, 11:30, 11:59, 12:56 line up exactly with the added test source; C3 map's winning candidate = Spike winner; C11 test fails to compile without the change; C1 filed spec#494 for the pre-existing SDD gap; C9/C10 NA for a contract module).

Comments considered

  • #7351629328 (@github-actions[bot], BLOCK on missing COORD): stale-superseded — the thread now carries a HOLDING comment naming both sides; the finding does not reproduce against the current state.
  • #7351752754 (@aitrawog, HOLDING): verified-non-blocking — first non-blank line is a closed-set label, names both sides (spec#493 blocks sdk#686), footer well-formed. Non-gating note: its footer tier documentation reviewed is inapplicable to a code diff (an under-claim, not inflation) — use the body's tier when posting CLEARED. The reciprocal WAITING on sdk#686's thread is asserted in the body but not visible in this context (tool-limited disposition).

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) December 2, 2026 16:35
@github-actions
github-actions Bot merged commit 0cdcbdc into main Dec 2, 2026
6 of 7 checks passed
charly-auto-merge Bot added a commit that referenced this pull request Dec 2, 2026
@aitrawog

aitrawog commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

CLEARED

CLEARED: #493 merged as 0cdcbdc, tag v0.2026336.1635. opencharly/sdk#686 is unblocked on it. The sdk change opens once #487 (Deploy.provide, which the same sdk PR needs) is also tagged.

Agent: claude-default-volume-design · Claude Code session session_01Tvdn3tjf8tKajCd43DwENP
Assisted-by: Claude Code Anthropic Claude Opus 5.5 (documentation reviewed)

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.

port_range: DeployConfig yields DESIGN's default range (40000-49999) where the local document sets none

1 participant