-
Notifications
You must be signed in to change notification settings - Fork 0
fix(MESHAGEN-004-2): CU-86akbhhdk 27 review findings across 18 files #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
ba3474f
cf8b1e8
e742d84
8394b80
3292a92
9cb9208
5cbe74e
9d64243
07ffb1c
1f18cc3
63ee68c
50e3acf
3b9882b
1f1a984
af7baa0
705da73
2c692b4
a1ba52e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,19 @@ | ||
| /* | ||
| Copyright 2006 - 2021 Intel Corporation | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| #include "mac_events.h" | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ mac_events.c missing the required Apache 2.0 / Intel copyright header Added the standard Apache License 2.0 block comment with Intel Corporation copyright notice at the very top of meshcore/KVM/MacOS/mac_events.c, immediately before the existing π€ Prompt for AI agentsfix confidence: π’ 90 high β react π/π to teach the reviewer |
||
| #include <assert.h> | ||
| #include <SystemConfiguration/SystemConfiguration.h> | ||
|
|
@@ -308,3 +324,4 @@ void KeyActionUnicode(uint16_t unicode, int up) | |
| CFRelease(key); | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,19 @@ | ||
| /* | ||
| Copyright 2022 Intel Corporation | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| /* | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ mac_kvm_auth.h missing required Apache 2.0 / Intel license header Added the standard Apache License 2.0 / Intel Corporation copyright block comment at the very top of π€ Prompt for AI agentsfix confidence: π’ 90 high β react π/π to teach the reviewer |
||
| * mac_kvm_auth.h | ||
| * | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,19 @@ | ||
| /* | ||
| * mac_tile.c | ||
| * | ||
| * | ||
| * Created by Ylian Saint-Hilaire on 8/18/11. | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π mac_tile.c bears a personal 'MyCompanyName' placeholder copyright rather than Intel's canonical notice Replaced the Xcode-template header at the top of π€ Prompt for AI agentsfix confidence: π‘ 75 medium β react π/π to teach the reviewer |
||
| * Copyright 2011 __MyCompanyName__. All rights reserved. | ||
| * Copyright 2011 Intel Corporation | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #include "mac_tile.h" | ||
|
|
@@ -544,3 +553,4 @@ void set_tile_compression(int type, int level) | |
| // TODO Make sure the all the types are handled. We ignore the type variable for now. | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| /* | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ bundle_detection.h copyright header uses generic '2025' instead of Intel Corporation copyright line Changed the copyright line in the file header comment (top of file, line 2) from "Copyright 2025" to "Copyright 2025 Intel Corporation" to match the canonical Apache 2.0 header convention used in sibling files like win-registry.js and ILibDuktape_SHA256.c. π€ Prompt for AI agentsfix confidence: π’ 90 high β react π/π to teach the reviewer |
||
| Copyright 2025 | ||
| Copyright 2025 Intel Corporation | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
|
|
@@ -65,3 +65,4 @@ int adjust_working_directory_for_bundle(void); | |
| #endif /* __APPLE__ */ | ||
|
|
||
| #endif /* MACOS_BUNDLE_DETECTION_H */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,20 @@ | ||
| /** | ||
| * @copyright Copyright 2018 Intel Corporation | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #ifndef MAC_TCC_DETECTION_H | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ mac_tcc_detection.h missing required Apache 2.0 license header Added the standard Apache License 2.0 header block comment with the Intel Corporation copyright notice at the top of the file (before the π€ Prompt for AI agentsfix confidence: π‘ 80 medium β react π/π to teach the reviewer |
||
| #define MAC_TCC_DETECTION_H | ||
|
|
||
|
|
@@ -71,3 +88,4 @@ TCC_AllPermissions check_all_permissions(void); | |
| #endif | ||
|
|
||
| #endif // MAC_TCC_DETECTION_H | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,19 @@ | ||
| /* | ||
| Copyright 2024 Intel Corporation | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| #ifndef MAC_UI_HELPERS_H | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ mac_ui_helpers.h has no Apache 2.0 license header Added an Apache License, Version 2.0 header block (copyright + license boilerplate) at the top of meshcore/MacOS/mac_ui_helpers.h, before the π€ Prompt for AI agentsfix confidence: π‘ 80 medium β react π/π to teach the reviewer |
||
| #define MAC_UI_HELPERS_H | ||
|
|
||
|
|
@@ -25,3 +41,4 @@ | |
| NSTextField* mesh_createLabel(NSString* text, NSRect frame, BOOL bold); | ||
|
|
||
| #endif // MAC_UI_HELPERS_H | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,28 @@ | ||
| /* | ||
| * Copyright (C) Intel Corporation | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| /* | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ meshcore/openframe_file_logger.h missing Apache 2.0 / Intel copyright header Added the standard Apache License 2.0 block comment with the Intel Corporation copyright/SPDX line at the very top of the file, immediately before the pre-existing descriptive comment block, per MESHAGEN-004-2. No other content changed. π€ Prompt for AI agentsfix confidence: π’ 90 high β react π/π to teach the reviewer |
||
| OpenFrame File Logger - Duplicates printf to both console and file | ||
| Usage: Call enable_file_logging() at the start of main() | ||
|
|
||
| Features: | ||
| - Single log file: meshagent.log | ||
| - Single log file: meshcentral-agent.log | ||
| - Auto-rotation at 10MB | ||
| - Keeps only 1 archive (meshagent.log.old.gz) | ||
| - Keeps only 1 archive (meshcentral-agent.log.old.gz) | ||
| */ | ||
|
|
||
| #ifndef OPENFRAME_FILE_LOGGER_H | ||
|
|
@@ -39,6 +56,7 @@ Usage: Call enable_file_logging() at the start of main() | |
| #include <io.h> | ||
| #include <fcntl.h> | ||
| #include <sys/stat.h> | ||
| #include <zlib.h> | ||
| #endif | ||
|
|
||
| /* Macro to ignore return values */ | ||
|
Comment on lines
56
to
62
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π Log filename constant mismatch between file header comment and actual LOG_FILENAME macro Corrected the top-of-file descriptive comment (now inside the added header area) to say "meshcentral-agent.log" / "meshcentral-agent.log.old.gz" instead of "meshagent.log" / "meshagent.log.old.gz", so the documentation matches the actual π€ Prompt for AI agentsfix confidence: π‘ 85 medium β react π/π to teach the reviewer |
||
|
|
@@ -173,30 +191,6 @@ static inline long get_file_size(const char* filepath) { | |
| } | ||
|
|
||
| static inline int compress_file_to_gzip(const char* source_path, const char* dest_path) { | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ Windows.h included unconditionally guarded only by same #ifdef WIN32 block but check surrounding zlib include on POSIX Unified the Windows and POSIX implementations of π€ Prompt for AI agentsfix confidence: π΄ 55 low β review closely β react π/π to teach the reviewer |
||
| #ifdef WIN32 | ||
| FILE* src = fopen(source_path, "rb"); | ||
| FILE* dst = fopen(dest_path, "wb"); | ||
| char buffer[8192]; | ||
| size_t bytes; | ||
|
|
||
| if (!src || !dst) { | ||
| if (src) fclose(src); | ||
| if (dst) fclose(dst); | ||
| return 0; | ||
| } | ||
|
|
||
| while ((bytes = fread(buffer, 1, sizeof(buffer), src)) > 0) { | ||
| if (fwrite(buffer, 1, bytes, dst) != bytes) { | ||
| fclose(src); | ||
| fclose(dst); | ||
| return 0; | ||
| } | ||
| } | ||
|
|
||
| fclose(src); | ||
| fclose(dst); | ||
| return 1; | ||
| #else | ||
| FILE* src = fopen(source_path, "rb"); | ||
| gzFile dst = gzopen(dest_path, "wb9"); | ||
| char buffer[8192]; | ||
|
|
@@ -219,7 +213,6 @@ static inline int compress_file_to_gzip(const char* source_path, const char* des | |
| fclose(src); | ||
| gzclose(dst); | ||
| return 1; | ||
| #endif | ||
| } | ||
|
|
||
| static inline int rotate_log_file(void) { | ||
|
|
@@ -708,3 +701,4 @@ static inline void disable_file_logging(void) | |
| } | ||
|
|
||
| #endif // OPENFRAME_FILE_LOGGER_H | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,19 @@ | ||
| /* | ||
| * Copyright 2021 Intel Corporation | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| // stdafx.cpp : source file that includes just the standard includes | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ meshreset/stdafx.cpp missing Apache 2.0 / Intel copyright header Added an Apache License 2.0 block comment with Intel Corporation copyright at the top of meshreset/stdafx.cpp, above the pre-existing Visual Studio boilerplate comment, to satisfy MESHAGEN-004-2. The original file content is otherwise unchanged. Confidence is not higher because the exact copyright year and header wording/format expected by MESHAGEN-004-2 (e.g., specific year, additional trademark lines) is not fully specified and could not be verified against the project's canonical header template. π€ Prompt for AI agentsfix confidence: π‘ 70 medium β react π/π to teach the reviewer |
||
| // TinyMesh.pch will be the pre-compiled header | ||
| // stdafx.obj will contain the pre-compiled type information | ||
|
|
@@ -6,3 +22,4 @@ | |
|
|
||
| // TODO: reference any additional headers you need in STDAFX.H | ||
| // and not in this file | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,21 @@ | ||
| /* | ||
| * Copyright (C) 2023 Intel Corporation | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| /* | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ duk_module_duktape.c missing required Apache 2.0 / Intel license header Added the mandatory Apache License 2.0 header block with Intel Corporation copyright and SPDX identifier at the top of π€ Prompt for AI agentsfix confidence: π΄ 55 low β review closely β react π/π to teach the reviewer |
||
| * Duktape 1.x compatible module loading framework | ||
| */ | ||
|
|
@@ -469,3 +487,4 @@ void duk_module_duktape_init(duk_context *ctx) { | |
| #undef DUK__IDX_FRESH_REQUIRE | ||
| #undef DUK__IDX_EXPORTS | ||
| #undef DUK__IDX_MODULE | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,19 @@ | ||
| /* | ||
| * Copyright (c) 2024 Intel Corporation | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #if !defined(DUK_MODULE_DUKTAPE_H_INCLUDED) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ duk_module_duktape.h header file is missing the Apache 2.0 license header Added the Apache License 2.0 block comment with the Intel Corporation copyright line at the top of microscript/duk_module_duktape.h, before the existing include guard ( π€ Prompt for AI agentsfix confidence: π‘ 70 medium β react π/π to teach the reviewer |
||
| #define DUK_MODULE_DUKTAPE_H_INCLUDED | ||
|
|
||
|
|
@@ -12,3 +28,4 @@ | |
| extern void duk_module_duktape_init(duk_context *ctx); | ||
|
|
||
| #endif /* DUK_MODULE_DUKTAPE_H_INCLUDED */ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
𦩠π΄ apply_labels.py is missing the required Apache 2.0 / project license header
Added an Apache License, Version 2.0 header comment block (with Intel Corporation copyright line) immediately after the shebang line at the top of
docs/modules/apply_labels.py, before theimport osstatement, following the project's established header convention referenced by MESHAGEN-004-2/MESHAGEN-007. Unverified: the exact copyright year and holder name format used elsewhere in the project were not visible in this file alone, so these were inferred as "2024" and "Intel Corporation" β a reviewer should confirm these match the project's canonical header text exactly.π€ Prompt for AI agents
fix confidence: π‘ 60 medium β react π/π to teach the reviewer