Skip to content

Add missing documentation for exposed structs in internal package#2232

Open
brucearctor wants to merge 4 commits intotemporalio:mainfrom
brucearctor:issue-2177
Open

Add missing documentation for exposed structs in internal package#2232
brucearctor wants to merge 4 commits intotemporalio:mainfrom
brucearctor:issue-2177

Conversation

@brucearctor
Copy link
Copy Markdown
Contributor

Fixes #2177

@brucearctor brucearctor requested a review from a team as a code owner March 15, 2026 23:38
Copy link
Copy Markdown
Contributor

@yuandrew yuandrew left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, left a few comments to address

Comment thread internal/activity.go Outdated
Comment thread internal/activity.go Outdated
ActivityType ActivityType
// TaskQueue is the name of the task queue that the activity needs to be scheduled on.
TaskQueue string
Namespace string // Namespace of this activity.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like some of these got missed due to having inline comments. Can we make sure the tool flags these to have doc comments, even if they have existing inline comments?

Comment thread internal/session.go Outdated
Comment thread internal/interceptor.go Outdated
Comment thread internal/resource_tuner.go Outdated
Comment thread internal/workflow.go Outdated
Comment thread internal/interceptor.go Outdated
Comment thread internal/resource_tuner.go Outdated
Comment thread internal/plugin.go Outdated
WorkflowServiceClient workflowservice.WorkflowServiceClient
// Namespace is the namespace for the replay.
Namespace string
// OriginalExecution is the execution used to start the replay.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Misleading comment, this is the original workflow execution being replayed, not "used to start the replay."

Comment thread internal/interceptor.go Outdated
Co-authored-by: Andrew Yuan <theandrewyuan@gmail.com>
type GetWorkerBuildIdCompatibilityOptions struct {
// TaskQueue is the task queue to query.
TaskQueue string
// MaxSets is the maximum number of sets to return.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

seems singular.

@brucearctor
Copy link
Copy Markdown
Contributor Author

Thanks for the contribution, left a few comments to address

thanks for thorough review. I believe I addressed these!

- Convert inline-only comments to proper doc comments (activity.go, workflow.go)
- Remove duplicate inline comments where doc comments exist (activity.go, workflow.go)
- Fix Chinese character in HeartbeatTimeout comment (session.go)
- Fix plural grammar: Args/Options/Details 'is' to 'are' (interceptor.go)
- Add operation context to WorkflowID/RunID comments (interceptor.go)
- Capitalize cpu to CPU in comments (resource_tuner.go)
- Expand PID: P=Proportional, I=Integral, D=Derivative (resource_tuner.go)
- Fix misleading Input comment per reviewer suggestion (error.go)
- Fix misleading OriginalExecution comment (plugin.go)
- Fix ID/RunID comment convention in WorkflowExecution (workflow.go)
- Simplify checkInternalDocs: skip anonymous fields, check field.Doc only (doclink.go)
Comment thread internal/resource_tuner.go Outdated
// CpuOutputThreshold is the CPU output threshold limit.
CpuOutputThreshold float64

// MemPGain is the memory P gain limit threshold.
Copy link
Copy Markdown
Contributor Author

@brucearctor brucearctor Mar 24, 2026

Choose a reason for hiding this comment

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

Wasn't sure whether to capitalize to P/I/D. Can lowercase if preferred.

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.

Ensure all internal structs that are exposed publically are fully documented

2 participants