Skip to content

Commit 27cac6d

Browse files
michaelmcneesclaude
andcommitted
docs: add Go doc comments to exported symbols for docstring coverage
Add missing doc comments to Store.Create, Store.GetByName, Store.ListByExecution, FilesystemTmpStorage.Put, FilesystemTmpStorage.DeleteByPrefix, and DockerRunConnector.Execute to reach 80% docstring coverage on PR-modified files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e6cc139 commit 27cac6d

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

internal/artifact/store.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ type Store struct {
2323
DB *sql.DB
2424
}
2525

26+
// Create inserts artifact metadata into the database.
2627
func (s *Store) Create(ctx context.Context, a *Artifact) error {
2728
_, err := s.DB.ExecContext(ctx, `
2829
INSERT INTO execution_artifacts (execution_id, step_name, name, url, size)
@@ -34,6 +35,7 @@ func (s *Store) Create(ctx context.Context, a *Artifact) error {
3435
return nil
3536
}
3637

38+
// GetByName retrieves a single artifact by execution ID and artifact name.
3739
func (s *Store) GetByName(ctx context.Context, executionID, name string) (*Artifact, error) {
3840
var a Artifact
3941
err := s.DB.QueryRowContext(ctx, `
@@ -50,6 +52,7 @@ func (s *Store) GetByName(ctx context.Context, executionID, name string) (*Artif
5052
return &a, nil
5153
}
5254

55+
// ListByExecution returns all artifacts associated with the given execution, ordered by creation time.
5356
func (s *Store) ListByExecution(ctx context.Context, executionID string) ([]Artifact, error) {
5457
rows, err := s.DB.QueryContext(ctx, `
5558
SELECT id, execution_id, step_name, name, url, size, created_at

internal/artifact/tmp.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ type FilesystemTmpStorage struct {
2424
BasePath string
2525
}
2626

27+
// Put copies the file at localPath to the storage location identified by key and returns its path.
2728
func (fs *FilesystemTmpStorage) Put(ctx context.Context, key string, localPath string) (string, error) {
2829
destPath := filepath.Join(fs.BasePath, key)
2930
if err := os.MkdirAll(filepath.Dir(destPath), 0755); err != nil {
@@ -49,6 +50,7 @@ func (fs *FilesystemTmpStorage) Put(ctx context.Context, key string, localPath s
4950
return destPath, nil
5051
}
5152

53+
// DeleteByPrefix removes all files stored under the given key prefix.
5254
func (fs *FilesystemTmpStorage) DeleteByPrefix(ctx context.Context, prefix string) error {
5355
target := filepath.Join(fs.BasePath, prefix)
5456
absBase, err := filepath.Abs(fs.BasePath)

internal/connector/docker.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ func (lw *limitWriter) Write(p []byte) (int, error) {
170170
return n, err
171171
}
172172

173+
// Execute runs a Docker container to completion and returns its exit code, stdout, and stderr.
173174
func (c *DockerRunConnector) Execute(ctx context.Context, params map[string]any) (map[string]any, error) {
174175
cfg, err := parseDockerParams(params)
175176
if err != nil {

0 commit comments

Comments
 (0)