Conversation
Phases 1-4 changed Go types, gRPC fields, headers, annotations, metric labels, OTLP attrs, slog keys, CLI flags, and Web UI routes. This sweep brings the prose surfaces in line: doc-comments, README examples, the architecture and guide pages, help-text descriptions, one Help: metric string, the assignmentHashIndex const value, several stale Test/Bench names, and the previously-untracked UBIQUITOUS_LANGUAGE.md at the repo root. A new doclint forbidden-tokens rule (with a TDD-style test) catches regressions for FunctionHash, FunctionFromHeader, skipper.Function, skipper.FunctionKey, and functionHash. docs/content/guides/deploying-functions.md is renamed to deployments.md, since the page is really about labelling K8s deployments for Skipper to pool.
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit afd8290. Configure here.
The previous rename pointed TestAssignmentKeyEquivalence, TestAssignmentKeyConcurrent, and BenchmarkAssignmentKeyAttr at AssignmentKey only and dropped coverage of LegacyFunctionKey, even though LegacyFunctionKey is still actively used on every dual-emit production path (controller server, supervisor converge, router telemetry). A caching regression on LegacyFunctionKey would have gone undetected. Parametrise each test over both cached *Assignment keys so both hit paths stay pinned.
`fn` was the short form of "function" from before this domain became "assignment"; it no longer maps to the concept it names and clouds intent at call sites. Apply Assignment-based names: short `a` for parameters and locals (matching existing `func (a *Assignment)` receivers), full `assignment` for struct fields and compound identifiers (assignmentHeader, assignmentFilter, defaultAssignment, etc.). Genuine func-value callbacks in timer.Poll/Loop and the doclint forEach* helpers keep `fn` -- there they name a function value, not an Assignment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Phase 5 of the assignment-redesign plan. Phases 1-4 changed the canonical surfaces (Go types, gRPC fields, HTTP headers, K8s annotations, Prometheus labels, OTLP attributes, slog keys, CLI flags, Web UI routes) but the long-tail surfaces lagged behind. This sweep brings them in line: doc-comments across
internal/,README.md, the architecture and guide pages, help-textdescription:tags, one PrometheusHelp:string, theassignmentHashIndexconst value ("functionHash"->"assignmentHash"), a handful of staleTest*/Benchmark*identifiers, and the previously-untrackedUBIQUITOUS_LANGUAGE.mdat the repo root.A new
forbidden-tokensdoclint rule (with a TDD-style test ininternal/dev/doclint/forbidden_tokens_test.go) catches regressions forFunctionHash,FunctionFromHeader,skipper.Function,skipper.FunctionKey, andfunctionHash-- five symbol-shaped tokens that have no legitimate post-rename usage. The test also pins the word-boundary edge case soskipper.FunctionKeydoes not double-match the bareskipper.Functionpattern.fn-- the short form of "function" from before this domain became "assignment" -- is renamed across the Go codebase to Assignment-based names. Parameters and locals use shortato match existingfunc (a *Assignment) ...receivers; struct fields and compound identifiers use the full word (assignment,assignmentHeader,assignmentFilter,defaultAssignment, etc.). Genuinefunc-value callbacks intimer.Poll/Loopand the doclintforEach*helpers keepfn, since there it names a function value rather than an Assignment.docs/content/guides/deploying-functions.mdis renamed todeployments.md(and the docs sidebar incmd/dev/docs.goupdated to match), since the page is really about labelling K8s deployments for Skipper to pool -- a more accurate framing than either "Functions" or "Assignments".Stacked on top of #141 (Phase 4: flat policy surface + 9 wired knobs). Plan:
tmp/assignment-redesign/plan.md.