@besales/ops-framework 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.10
4
+
5
+ - Fixed `project.ops.yaml` parsing for comment-only lines, including generated header comments and placeholder root comments.
6
+
3
7
  ## 0.1.9
4
8
 
5
9
  - Added `--phase` and `--include` filters to initiative intake/requirements flows.
@@ -56,6 +56,9 @@ export function parseProjectOpsConfig(content) {
56
56
  const config = {};
57
57
  const stack = [{ indent: -1, value: config, parent: null, key: null }];
58
58
  for (const rawLine of content.split(/\r?\n/)) {
59
+ if (/^\s*#/.test(rawLine)) {
60
+ continue;
61
+ }
59
62
  const withoutComment = rawLine.replace(/\s+#.*$/, '');
60
63
  if (!withoutComment.trim()) {
61
64
  continue;
@@ -33,6 +33,36 @@ risk:
33
33
  expect(config.risk.backendRoots).toEqual(['services/api']);
34
34
  });
35
35
 
36
+ it('ignores comment-only and inline comments in project.ops.yaml', () => {
37
+ const config = parseProjectOpsConfig(`
38
+ # Internal development tooling only. This agent pipeline helps plan/check repo work.
39
+ name: ExampleProject # inline project name note
40
+ ops:
41
+ legacyPipelineDir: ops/agent-pipeline
42
+ tasksDir: ops/agent-pipeline/tasks
43
+ initiativesDir: ops/agent-pipeline/initiatives
44
+ memoryDir: ops/agent-pipeline/memory
45
+ cacheDir: ops/agent-pipeline/cache
46
+ playbooksDir: ops/agent-pipeline/playbooks
47
+ agents:
48
+ configFile: ops/agent-pipeline/config/agents.json
49
+ risk:
50
+ uiRoots:
51
+ # - apps/web
52
+ - web/app # real UI root
53
+ backendRoots:
54
+ # - apps/api
55
+ workerRoots:
56
+ # - apps/workers
57
+ `);
58
+
59
+ expect(config.name).toBe('ExampleProject');
60
+ expect(config.ops.initiativesDir).toBe('ops/agent-pipeline/initiatives');
61
+ expect(config.risk.uiRoots).toEqual(['web/app']);
62
+ expect(config.risk.backendRoots).toEqual({});
63
+ expect(config.risk.workerRoots).toEqual({});
64
+ });
65
+
36
66
  it('finds project config by walking upward from cwd', () => {
37
67
  const root = fs.mkdtempSync(path.join(os.tmpdir(), 'ops-project-'));
38
68
  const nested = path.join(root, 'apps', 'tool');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@besales/ops-framework",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "ops-agent": "bin/ops-agent.mjs"