Skip to content

fix(1c-metadata-manage): meta-compile modules: false and ScheduledJob schedule, -ExecutionPolicy Bypass in docs and nested runs, two doc gaps - #49

Merged
comol merged 5 commits into
comol:mainfrom
BadMadJohn:fix/metadata-manage-gaps-2
Nov 29, 2026

Conversation

@BadMadJohn

Copy link
Copy Markdown
Contributor

Five independent changes, one commit each, so any of them can be dropped or cherry-picked. Each one comes from a real task where the tool failed or misled the agent and the step had to be done another way; together they were hit 5–12 times across several 1C projects.

Commit Tool Problem Fix
943ccd7 meta-compile v1.131 Always writes empty ObjectModule.bsl / ManagerModule.bsl (and ValueManagerModule / RecordSetModule); a DCS report without code must have none, so agents deleted the stubs by hand Top-level "modules": false skips those stubs (no Ext/ just for them). Default unchanged. Module.bsl of CommonModule / HTTPService / WebService and CommandModule.bsl are not affected; existing files are never deleted
0363315 meta-compile v1.132 A ScheduledJob gets no Ext/Schedule.xml and no tool can set a schedule; agents copied the file from a neighbouring job schedule key (beginTime, endTime, completionTime, beginDate, endDate, daysRepeatPeriod, weeksPeriod, repeatPeriodInDay, repeatPause, completionInterval, dayInMonth, weekDayInMonth, weekDays, months) writes the file in the Designer shape (UTF-8 BOM, CRLF, detected format version). Validated before any write: an unknown key or bad value exits 1 with nothing written; schedule on another type is refused. No key → no file, as before. DetailedDailySchedules is out of scope (documented)
7886fcc docs Every run example is powershell.exe -NoProfile -File …; with the default Restricted policy of Windows PowerShell 5.1 the script does not start ("running scripts is disabled") -ExecutionPolicy Bypass in all examples of SKILL.md, docs/*.md, tool .md files and commands/check-uuid.md; one sentence in SKILL.md says why
ee7e1b9 cf-edit, interface-edit, meta-edit (+ .py hints), role-edit, subsystem-compile, subsystem-edit, meta-compile batch The nested validator / batch child is started as powershell.exe -NoProfile -File … without the flag. Under pwsh 7 (RemoteSigned by default) the parent runs, but the child Windows PowerShell 5.1 has its own policy (Restricted) and the auto-validation fails after a successful edit -ExecutionPolicy Bypass on every nested -File launch, also in the hint strings and commands/doctor.md; a static regression case checks that no nested launch under tools/ lacks it
ce1a4c2 docs meta-manage.md promised "String without qualifiers" for a bare attribute, but meta-compile / meta-edit give String(10) (like Designer); agents expected an unlimited string. 1c-validate did not say that check_1c_code checks only the beginning of a module longer than the server input limit (a 5108-line module was checked for lines 1–2398) Behaviour unchanged, docs say String = String(10), unlimited = String(0), and how to fix an existing attribute; 1c-validate/SKILL.md says how to check a large module (syntaxcheck_file on the whole file, check_1c_code / review_1c_code on a fragment)

Each script change has its CHANGELOG.md entry (Local 2026-11-25) and a version bump with a Local line in the script header.

Checked

  • tools/tests/metadata-tools-regression.ps1: 94/97 on 44c3d6b → 99/102. Five new cases: modules: false vs default (plus CommonModule and a bad value), Schedule.xml bytes and attributes, no file without schedule, refusal of four invalid schedules with nothing written, nested launches carry -ExecutionPolicy. Four of them fail on the old scripts (the "no schedule → no file" case guards the old behaviour). The 2 remaining failures (Invoke-1CEdit: -Preview restores the tree byte-for-byte (copy backend), Invoke-1CEdit: a clean preview outside git exits 0…) are the same on 44c3d6b and unrelated.
  • tools/tests/python-ports-regression.py: 69/70 (1 skipped) before and after.
  • tools/validate-rules.ps1, tools/tests/vendored-drift.ps1: OK.
  • End-to-end on 8.3.24.1691: db-create → cf-init (2.17) → meta-compile of a CommonModule, a ScheduledJob with schedule (08:15, Mon–Fri, every 600 s) and a Report with modules: false → meta-validate / cf-validate → db-load-xml → db-update → db-dump-xml. All exit 0; the dumped Schedule.xml is byte-identical to the generated one, the dumped report has no module files.
  • Nested policy: pwsh -NoProfile -File meta-edit.ps1 … add-attribute with Windows PowerShell 5.1 policy Undefined (= Restricted) and no inherited PSExecutionPolicyPreference: exit 1 with "meta-validate.ps1 cannot be loaded because running scripts is disabled" on 44c3d6b, exit 0 with "Validation OK" on this branch.

Not changed

  • 1c-repository-manage docs and the repository README.md files still show powershell -NoProfile -File.
  • meta-edit has no operation to change the schedule of an existing job; meta-compile -Force rewrites it.

🤖 Generated with Claude Code

BadMadJohn and others added 5 commits November 25, 2026 10:12
…ty module stubs

meta-compile always wrote empty ObjectModule / ManagerModule / ValueManagerModule /
RecordSetModule files for the types that have them, so a report on a DCS with no code
needed them deleted by hand. The top-level key `modules: false` (default true) skips
them without creating Ext/ for them. Module.bsl of CommonModule / HTTPService /
WebService and CommandModule.bsl of CommonCommand are unaffected; existing files are
never deleted. Documented in meta-dsl-spec.md and meta-manage.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ScheduledJob `schedule`

Only the object properties of a ScheduledJob were written, so no tool could set a
schedule and agents copied Schedule.xml from a neighbouring job. The new `schedule`
key (beginTime, endTime, completionTime, beginDate, endDate, daysRepeatPeriod,
weeksPeriod, repeatPeriodInDay, repeatPause, completionInterval, dayInMonth,
weekDayInMonth, weekDays, months) writes the file in the Designer shape (UTF-8 BOM,
CRLF, version = detected format). Without the key nothing changes. An unknown key or
a bad value is refused before anything is written. DetailedDailySchedules is not
supported. Regression cases cover the file, the absent key and the refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The docs told agents to run `powershell.exe -NoProfile -File <script>.ps1`. On a machine
with the default Restricted policy Windows PowerShell 5.1 refuses that ("running scripts
is disabled on this system"), and the only way out found in practice was adding
`-ExecutionPolicy Bypass`. Every run example in the skill docs and in /check-uuid now
carries it, and SKILL.md says why. CHANGELOG history is left as written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…c_code truncation

meta-compile and meta-edit give a bare `String` (and a bare attribute name) length 10,
the Designer default, but meta-manage.md called it "String without qualifiers" and
listed `String(100)` as the type, so agents expected an unlimited string. The docs now
say String(10), name String(0) as the unlimited form and show the meta-edit
modify-attribute fix. Behaviour is unchanged.

check_1c_code / review_1c_code silently check only the beginning of a module larger
than ONEC_AI_INPUT_MAX_LENGTH and have no line range. 1c-validate now says to run
syntaxcheck_file on the whole file and give the AI validators a fragment file, and that
"undefined method" findings outside the fragment are artifacts of the cut.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Bypass

A child process does not carry the parent's -ExecutionPolicy Bypass, so the nested
validator started by cf-edit, interface-edit, meta-edit, role-edit, subsystem-compile and
subsystem-edit, and the batch child of meta-compile, failed on a machine whose policy
refuses scripts ("running scripts is disabled on this system") although the edit itself
ran. Every nested launch now passes the flag, the form-add / add-template hints printed by
meta-edit (both runtimes) and the validate-rules command of /doctor carry it too. A static
regression case fails on any nested -NoProfile ... -File launch without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@comol
comol merged commit 879b450 into comol:main Nov 29, 2026
3 checks passed
@comol

comol commented Nov 29, 2026

Copy link
Copy Markdown
Owner

Thank you — merged into main in 879b450 with your five commits as they are. CI on the merge is green.

main had moved on since your base (the 2026-11-27 upstream sync), so the merge needed a few extra changes:

  • Conflicts: in docs/cfe-manage.md I kept the new cfe-diff v2.2 example (no -ConfigPath / -Mode) and added your flag. In docs/CHANGELOG.md the sync entry stays first under meta-manage.md and your entries follow it.
  • cfe-transfer v1.62: this script came with the sync and has four staged-validator launches without -ExecutionPolicy Bypass. Your static case caught them; they now carry the flag. The run examples added by the sync (cfe-transfer, hygiene-check, form-decompile, meta-decompile, mxl-render) have it too.
  • Two wording fixes after checking the sources:
    • A Windows PowerShell 5.1 parent started with -ExecutionPolicy Bypass does pass the policy to its children through PSExecutionPolicyPreference (checked here). The failing case is the one from your test: a parent started without the flag, such as pwsh 7. The CHANGELOG now says that.
    • Current MCP_1copilot servers do flag a cut module. Since 2026-10 the answer starts with «ВНИМАНИЕ: проверена только часть кода», and checks shows partial. An older server cuts without a warning, which is probably what you hit. 1c-validate now says both; your recipe for large modules is unchanged.

Results on the merge: metadata-tools-regression 101/102 (one Unix-only skip, 0 failed; both Invoke-1CEdit preview cases pass here), python-ports-regression --strict 70/70, cfe-borrow-regression 19/19, validate-rules and vendored-drift OK.

comol added a commit that referenced this pull request Nov 29, 2026
…d the printed dump command; ignore local tool settings

Follow-up to PR #49, which left these out ("Not changed"):
- 1c-repository-manage SKILL.md and docs/repo-ops.md run examples, and the
  db-dump-xml command repo-ops prints after `update` receives objects
  (repo-ops v1.3 -> v1.4). Windows PowerShell 5.1 with the default Restricted
  policy refuses a plain -File run.
- plugins/1c-rules/README.md: the two Windows local-check commands. The pwsh
  examples for Linux / macOS stay as they are: no execution policy there.

.gitignore: /.ai-rules.json, /.codex/, /.cursor/ of this checkout (Cursor MCP,
Codex project config, /checkupdates state) are local, not part of the ruleset.
Anchored, because content/openspec-bundle/cursor/.cursor/ is tracked.

Checked: repo-ops-regression 23/23, marketplace-bootstrap 8/8, validate-rules OK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants