You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
File provider: add ReadString method and List support for nf-ops migration #222
The noblefactor-ops FileReceiver is being replaced by the devlore-cli file provider (noblefactor-ops #98). Several capabilities are missing or broken.
Broken: Read returns Resource metadata, not file content
file.Read(path) docstring says "Returns: result: the contents of the file" but the code returns a Resource struct (metadata: inode, size, mode, checksum). It never reads the actual file content. Only callers are tests and plan.source() (indirect). This appears to be an AI implementation error.
Fix: Read should return the file content as a string. The current Resource-metadata behavior is useless — Exists, IsFile, and IsDir already cover metadata needs. If the Resource return is needed for plan.source() graph semantics, rename it to Stat or Resolve and make Read return (string, error).
Missing: List (directory listing)
nf-ops file.list(path, gitignore?) returns [{name, path, is_dir}] for directory entries. devlore has no equivalent. Glob("dir/*") returns paths but not the is_dir metadata. WalkTree is recursive (not single-level).
Options:
Add a List(path Resource, honorGitignore bool) ([]map[string]any, error) method
Accept that glob("dir/*") + is_dir() on each result is sufficient (nf-ops scripts don't currently call file.list() anyway)
Missing: DryRun in immediate mode
nf-ops FileReceiver checks a global DryRun flag before write, mkdir, remove, remove_all. The devlore file provider only enforces DryRun at the graph execution layer (action_reflect.go). In immediate mode (nf-ops style), write operations execute unconditionally.
Options:
Add p.Context().DryRun checks to write-side provider methods
Accept that immediate-mode callers handle DryRun externally
The FileReceiver is one of 9 receivers being migrated
Current nf-ops usage: only lint-copyright.star calls file.read(), file.write(), file.exists(), file.glob() — but the new Go style linter will use more file operations
Activity
fix(file): Replace Read with ReadText/ReadBytes, fix Link param name (#…
fix(file): Replace Read with ReadText/ReadBytes, fix Link param name (#…